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
This commit is contained in:
f0c1s 2022-07-04 09:25:40 +05:30 committed by GitHub
parent f7ce6d6dcb
commit 06ed917f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 13 deletions

View File

@ -103,7 +103,7 @@ export interface DisabledOverlayerProps {
}
const DisabledOverlayer = styled.div<DisabledOverlayerProps>`
${overlayerMixin}
${overlayerMixin};
display: ${({ disabled }) => (disabled ? `flex` : `none`)};
height: 100%;
z-index: 2;
@ -358,7 +358,6 @@ function ControlPanel(props: ControlPanelProps) {
/>
</TooltipComponent>
);
break;
case MediaCaptureStatusTypes.IMAGE_CAPTURED:
return (
@ -383,7 +382,6 @@ function ControlPanel(props: ControlPanelProps) {
</TooltipComponent>
</>
);
break;
case MediaCaptureStatusTypes.IMAGE_SAVED:
return (
@ -398,7 +396,6 @@ function ControlPanel(props: ControlPanelProps) {
/>
</TooltipComponent>
);
break;
case MediaCaptureStatusTypes.VIDEO_DEFAULT:
return (
@ -417,7 +414,7 @@ function ControlPanel(props: ControlPanelProps) {
/>
</TooltipComponent>
);
break;
case MediaCaptureStatusTypes.VIDEO_RECORDING:
return (
<>
@ -447,7 +444,6 @@ function ControlPanel(props: ControlPanelProps) {
</TooltipComponent>
</>
);
break;
case MediaCaptureStatusTypes.VIDEO_CAPTURED:
return (
@ -482,7 +478,6 @@ function ControlPanel(props: ControlPanelProps) {
</TooltipComponent>
</>
);
break;
case MediaCaptureStatusTypes.VIDEO_PLAYING:
return (
@ -519,7 +514,6 @@ function ControlPanel(props: ControlPanelProps) {
</TooltipComponent>
</>
);
break;
case MediaCaptureStatusTypes.VIDEO_PAUSED:
return (
@ -554,7 +548,6 @@ function ControlPanel(props: ControlPanelProps) {
</TooltipComponent>
</>
);
break;
case MediaCaptureStatusTypes.VIDEO_SAVED:
return (
@ -581,7 +574,6 @@ function ControlPanel(props: ControlPanelProps) {
</TooltipComponent>
</>
);
break;
case MediaCaptureStatusTypes.VIDEO_PLAYING_AFTER_SAVE:
return (
@ -608,7 +600,6 @@ function ControlPanel(props: ControlPanelProps) {
</TooltipComponent>
</>
);
break;
case MediaCaptureStatusTypes.VIDEO_PAUSED_AFTER_SAVE:
return (
@ -635,7 +626,6 @@ function ControlPanel(props: ControlPanelProps) {
</TooltipComponent>
</>
);
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;

View File

@ -244,7 +244,7 @@ class CameraWidget extends BaseWidget<CameraWidgetProps, WidgetState> {
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);
}