We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0741984 + 16fc8dd commit b99dd6eCopy full SHA for b99dd6e
src/features/Callback/CallbackPage.tsx
@@ -2,14 +2,18 @@ import React from 'react';
2
import { Callback } from '@deriv-com/auth-client';
3
import { transformAccountsFromResponseBody } from '@site/src/utils';
4
import useAuthContext from '@site/src/hooks/useAuthContext';
5
+import { useHistory } from '@docusaurus/router';
6
+
7
const CallbackPage = () => {
8
const { updateLoginAccounts } = useAuthContext();
9
+ const history = useHistory();
10
11
return (
12
<Callback
13
onSignInSuccess={(tokens) => {
14
const accounts = transformAccountsFromResponseBody(tokens);
15
updateLoginAccounts(accounts);
- window.location.href = '/';
16
+ history.push('/');
17
}}
18
/>
19
);
0 commit comments