From 06ed917f8e3bef1cd76c82ac1f5f6b1c1d546679 Mon Sep 17 00:00:00 2001 From: f0c1s Date: Mon, 4 Jul 2022 09:25:40 +0530 Subject: [PATCH] chore: code cleanup - remove extra break (#14672) ## Description There are some instances of unreachable code, this PR fixes them. And some typos. ## Type of change - Code Quality Improvement and code cleanup ## Checklist: - [x] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes --- .../src/widgets/CameraWidget/component/index.tsx | 15 +++------------ .../src/widgets/CameraWidget/widget/index.tsx | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/app/client/src/widgets/CameraWidget/component/index.tsx b/app/client/src/widgets/CameraWidget/component/index.tsx index c56739fdb5..1b4cf640a1 100644 --- a/app/client/src/widgets/CameraWidget/component/index.tsx +++ b/app/client/src/widgets/CameraWidget/component/index.tsx @@ -103,7 +103,7 @@ export interface DisabledOverlayerProps { } const DisabledOverlayer = styled.div` - ${overlayerMixin} + ${overlayerMixin}; display: ${({ disabled }) => (disabled ? `flex` : `none`)}; height: 100%; z-index: 2; @@ -358,7 +358,6 @@ function ControlPanel(props: ControlPanelProps) { /> ); - break; case MediaCaptureStatusTypes.IMAGE_CAPTURED: return ( @@ -383,7 +382,6 @@ function ControlPanel(props: ControlPanelProps) { ); - break; case MediaCaptureStatusTypes.IMAGE_SAVED: return ( @@ -398,7 +396,6 @@ function ControlPanel(props: ControlPanelProps) { /> ); - break; case MediaCaptureStatusTypes.VIDEO_DEFAULT: return ( @@ -417,7 +414,7 @@ function ControlPanel(props: ControlPanelProps) { /> ); - break; + case MediaCaptureStatusTypes.VIDEO_RECORDING: return ( <> @@ -447,7 +444,6 @@ function ControlPanel(props: ControlPanelProps) { ); - break; case MediaCaptureStatusTypes.VIDEO_CAPTURED: return ( @@ -482,7 +478,6 @@ function ControlPanel(props: ControlPanelProps) { ); - break; case MediaCaptureStatusTypes.VIDEO_PLAYING: return ( @@ -519,7 +514,6 @@ function ControlPanel(props: ControlPanelProps) { ); - break; case MediaCaptureStatusTypes.VIDEO_PAUSED: return ( @@ -554,7 +548,6 @@ function ControlPanel(props: ControlPanelProps) { ); - break; case MediaCaptureStatusTypes.VIDEO_SAVED: return ( @@ -581,7 +574,6 @@ function ControlPanel(props: ControlPanelProps) { ); - break; case MediaCaptureStatusTypes.VIDEO_PLAYING_AFTER_SAVE: return ( @@ -608,7 +600,6 @@ function ControlPanel(props: ControlPanelProps) { ); - break; case MediaCaptureStatusTypes.VIDEO_PAUSED_AFTER_SAVE: return ( @@ -635,7 +626,6 @@ function ControlPanel(props: ControlPanelProps) { ); - break; default: break; @@ -691,6 +681,7 @@ function ControlPanel(props: ControlPanelProps) { const getFormattedDigit = (value: number) => { return value >= 10 ? value.toString() : `0${value.toString()}`; }; + export interface TimerProps { days: number; hours: number; diff --git a/app/client/src/widgets/CameraWidget/widget/index.tsx b/app/client/src/widgets/CameraWidget/widget/index.tsx index b3b5fe10fc..20f95d1ec0 100644 --- a/app/client/src/widgets/CameraWidget/widget/index.tsx +++ b/app/client/src/widgets/CameraWidget/widget/index.tsx @@ -244,7 +244,7 @@ class CameraWidget extends BaseWidget { this.props.updateWidgetMetaProperty("imageRawBinary", undefined); return; } - // Set isDirty to true when an image is caputured + // Set isDirty to true when an image is captured if (!this.props.isDirty) { this.props.updateWidgetMetaProperty("isDirty", true); }