Skip to content

Commit b913531

Browse files
committed
Don't display AP disconnect dialog on upgrade
1 parent 7cc50b2 commit b913531

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

frontend/src/components/onboarding_app/App.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export default () => {
4343
}
4444
};
4545

46+
const pathDisplaysApDisconnectDialog = (path: string) => {
47+
return ![PageRoute.Upgrade.toString(), PageRoute.Restart.toString()].includes(path);
48+
};
49+
4650
return (
4751
<>
4852
<Switch>
@@ -184,7 +188,7 @@ export default () => {
184188
<Route component={ErrorPage} />
185189
</Switch>
186190
<BuildInformation info={buildInfo} className={styles.buildInfo} />
187-
<HotspotDisconnectDialog enabled={useLocation().pathname !== PageRoute.Restart && enableDisconnectedFromApDialog} />
191+
<HotspotDisconnectDialog enabled={pathDisplaysApDisconnectDialog(useLocation().pathname) && enableDisconnectedFromApDialog} />
188192
</>
189193
);
190194
};

frontend/src/components/onboarding_app/__tests__/App.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ describe("App", () => {
354354

355355
// on upgrade page
356356
await waitForUpgradePage();
357-
await checkForDialog();
358357

359358
// mock upgrade and go to registration page
360359
await upgrade();

0 commit comments

Comments
 (0)