Skip to content

Commit 2c1b215

Browse files
committed
chore(dashboard): fix final wait before redirect
1 parent abdfa9c commit 2c1b215

File tree

1 file changed

+6
-2
lines changed
  • packages/apps/app-dashboard/src/components/user-dashboard/connect

1 file changed

+6
-2
lines changed

packages/apps/app-dashboard/src/components/user-dashboard/connect/ConnectPage.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { useJwtRedirect } from '@/hooks/user-dashboard/connect/useJwtRedirect';
2020
import { BigNumber } from 'ethers';
2121
import { addPayee } from '@/utils/user-dashboard/addPayee';
2222
import { usePendingAppConnectPkp } from '@/hooks/user-dashboard/connect/usePendingAppConnectPkp';
23+
import { wait } from '@/lib/utils';
2324

2425
interface ConnectPageProps {
2526
connectInfoMap: ConnectInfoMap;
@@ -67,8 +68,11 @@ export function ConnectPage({
6768
// Handle redirect when JWT is ready
6869
useEffect(() => {
6970
if (redirectUrl && !localSuccess) {
70-
setLocalSuccess('Success! Redirecting to app...');
71-
executeRedirect();
71+
(async () => {
72+
setLocalSuccess('Success! Redirecting to app...');
73+
await wait(1000);
74+
executeRedirect();
75+
})();
7276
}
7377
}, [redirectUrl, localSuccess, executeRedirect]);
7478

0 commit comments

Comments
 (0)