Skip to content

Commit

Permalink
Don't display AP disconnect dialog on upgrade (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcapona authored Aug 13, 2024
1 parent 7cc50b2 commit cd7b226
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion frontend/src/components/onboarding_app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export default () => {
}
};

const pathDisplaysApDisconnectDialog = (path: string) => {
return ![PageRoute.Upgrade.toString(), PageRoute.Restart.toString()].includes(path);
};

return (
<>
<Switch>
Expand Down Expand Up @@ -184,7 +188,7 @@ export default () => {
<Route component={ErrorPage} />
</Switch>
<BuildInformation info={buildInfo} className={styles.buildInfo} />
<HotspotDisconnectDialog enabled={useLocation().pathname !== PageRoute.Restart && enableDisconnectedFromApDialog} />
<HotspotDisconnectDialog enabled={pathDisplaysApDisconnectDialog(useLocation().pathname) && enableDisconnectedFromApDialog} />
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ describe("App", () => {

// on upgrade page
await waitForUpgradePage();
await checkForDialog();

// mock upgrade and go to registration page
await upgrade();
Expand Down

0 comments on commit cd7b226

Please sign in to comment.