summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/components
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-11-12 15:26:28 +0100
committerOskar Nyberg <oskar@mullvad.net>2022-03-14 13:58:44 +0100
commit940e39e38b942c04484acc2906f5a3bf77fe4897 (patch)
treea2a8fea639781c2716ed76e27be953cb6a1ec929 /gui/src/renderer/components
parent8d03e12c3021d3c08bc3335f2e39f229d4b337fc (diff)
downloadmullvadvpn-940e39e38b942c04484acc2906f5a3bf77fe4897.tar.xz
mullvadvpn-940e39e38b942c04484acc2906f5a3bf77fe4897.zip
Add correct transitions for too many devices view
Diffstat (limited to 'gui/src/renderer/components')
-rw-r--r--gui/src/renderer/components/TooManyDevices.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/gui/src/renderer/components/TooManyDevices.tsx b/gui/src/renderer/components/TooManyDevices.tsx
index 1075071cdd..7b434468c7 100644
--- a/gui/src/renderer/components/TooManyDevices.tsx
+++ b/gui/src/renderer/components/TooManyDevices.tsx
@@ -5,7 +5,8 @@ import { colors } from '../../config.json';
import { IDevice } from '../../shared/daemon-rpc-types';
import { messages } from '../../shared/gettext';
import { useAppContext } from '../context';
-import { useHistory } from '../lib/history';
+import { transitions, useHistory } from '../lib/history';
+import { RoutePath } from '../lib/routes';
import { useBoolean } from '../lib/utilityHooks';
import { useSelector } from '../redux/store';
import * as AppButton from './AppButton';
@@ -109,8 +110,8 @@ export default function TooManyDevices() {
const continueLogin = useCallback(() => login(accountToken), [login, accountToken]);
const cancel = useCallback(() => {
cancelLogin();
- history.pop();
- }, [history.pop, cancelLogin]);
+ history.reset(RoutePath.login, transitions.pop);
+ }, [history.reset, cancelLogin]);
useEffect(() => void fetchDevices(), []);