temporary fix redirect issue in nextjs export
This commit is contained in:
@@ -68,7 +68,7 @@ export default function Page() {
|
||||
// broadcast
|
||||
pool.publish(event, relays);
|
||||
// redirect to next step
|
||||
router.push(`/onboarding/create/step-2?pubkey=${pubkey}&privkey=${privkey}`);
|
||||
router.push(`/onboarding/create/step-2?pubkey=${pubkey}&privkey=${privkey}`, { forceOptimisticNavigation: true });
|
||||
}, [pool, pubkey, privkey, metadata, relays, router]);
|
||||
|
||||
return (
|
||||
|
||||
@@ -40,7 +40,7 @@ export default function Page() {
|
||||
privkey = nip19.decode(privkey).data;
|
||||
}
|
||||
if (typeof getPublicKey(privkey) === 'string') {
|
||||
router.push(`/onboarding/login/step-2?privkey=${privkey}`);
|
||||
router.push(`/onboarding/login/step-2?privkey=${privkey}`, { forceOptimisticNavigation: true });
|
||||
}
|
||||
} catch (error) {
|
||||
setError('key', {
|
||||
|
||||
@@ -125,7 +125,9 @@ export default function Page() {
|
||||
undefined,
|
||||
() => {
|
||||
updateLastLogin(dateToUnix(now.current));
|
||||
timeout.current = setTimeout(() => router.replace('/nostr/newsfeed/following'), 5000);
|
||||
timeout.current = setTimeout(() => {
|
||||
router.replace('/nostr/newsfeed/following', { forceOptimisticNavigation: true });
|
||||
}, 5000);
|
||||
},
|
||||
{
|
||||
unsubscribeOnEose: true,
|
||||
@@ -160,7 +162,7 @@ export default function Page() {
|
||||
// fetch data
|
||||
fetchData(account, account.follows);
|
||||
} else {
|
||||
router.replace('/onboarding');
|
||||
router.replace('/onboarding', { forceOptimisticNavigation: true });
|
||||
}
|
||||
})
|
||||
.catch(console.error);
|
||||
|
||||
Reference in New Issue
Block a user