Skip to content

Commit 3c0b659

Browse files
committed
frontend/dialog: remove disableClose param
Only used in the factory reset dialog during isConfirming, but when isConfirming is true, the FactoryResetWaitDialog is shown and the original dialog is hidden anyway.
1 parent 5ef0906 commit 3c0b659

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

frontends/web/src/components/dialog/dialog.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ type TProps = {
2929
centered?: boolean;
3030
disableEscape?: boolean;
3131
onClose?: (e?: Event) => void;
32-
disabledClose?: boolean;
3332
children: React.ReactNode;
3433
open: boolean;
3534
}
@@ -43,7 +42,6 @@ export const Dialog = ({
4342
centered,
4443
disableEscape,
4544
onClose,
46-
disabledClose,
4745
children,
4846
open,
4947
}: TProps) => {
@@ -204,7 +202,7 @@ export const Dialog = ({
204202
{ onClose ? (
205203
<button className={style.closeButton} onClick={() => {
206204
deactivate(true);
207-
}} disabled={disabledClose}>
205+
}}>
208206
<CloseXDark className="show-in-lightmode" />
209207
<CloseXWhite className="show-in-darkmode" />
210208
</button>

frontends/web/src/routes/settings/components/device-settings/factory-reset-setting.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ type TProps = {
3232
type TDialog = {
3333
open: boolean;
3434
handleCloseDialog: () => void;
35-
isConfirming: boolean;
3635
understand: boolean;
3736
handleUnderstandChange: (e: ChangeEvent<HTMLInputElement>) => void;
3837
handleReset: () => void;
@@ -84,7 +83,6 @@ const FactoryResetSetting = ({ deviceID }: TProps) => {
8483
<FactoryResetDialog
8584
open={activeDialog}
8685
handleCloseDialog={abort}
87-
isConfirming={isConfirming}
8886
understand={understand}
8987
handleUnderstandChange={handleUnderstandChange}
9088
handleReset={reset}
@@ -98,7 +96,6 @@ const FactoryResetSetting = ({ deviceID }: TProps) => {
9896
const FactoryResetDialog = ({
9997
open,
10098
handleCloseDialog,
101-
isConfirming,
10299
understand,
103100
handleUnderstandChange,
104101
handleReset
@@ -109,7 +106,6 @@ const FactoryResetDialog = ({
109106
open={open}
110107
title={t('reset.title')}
111108
onClose={handleCloseDialog}
112-
disabledClose={isConfirming}
113109
small>
114110
<div className="columnsContainer half">
115111
<div className="columns">
@@ -147,4 +143,4 @@ const FactoryResetWaitDialog = ({ isConfirming }: TWaitDialog) => {
147143

148144
};
149145

150-
export { FactoryResetSetting };
146+
export { FactoryResetSetting };

0 commit comments

Comments
 (0)