Skip to content

fix auth redirects and ensure proper page refresh#647

Merged
moehdotdev merged 1 commit into
mainfrom
dev
Mar 18, 2026
Merged

fix auth redirects and ensure proper page refresh#647
moehdotdev merged 1 commit into
mainfrom
dev

Conversation

@moehdotdev

Copy link
Copy Markdown
Member
  • add router.refresh() after auth-based redirects in home, workspace, and note pages
  • ensure refresh is triggered when redirecting unauthenticated users to /signup
  • ensure refresh is triggered when required params (noteId, workingSpaceId) are missing and redirecting to /home

why this change
previously, redirects using router.replace could leave stale UI or state behind, especially with server components and cached data. this could result in incorrect content flashing briefly or not updating properly after navigation.

adding router.refresh() ensures the app re-fetches the latest data and resets the state after a redirect, leading to more consistent behavior and eliminating edge cases where the UI doesn’t fully reflect the new route.

@vercel

vercel Bot commented Mar 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
notevo Building Building Preview, Comment Mar 18, 2026 0:46am

@moehdotdev moehdotdev merged commit 3744656 into main Mar 18, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant