Skip to content

fix redirect() in client components to router.replace()#685

Merged
moehdotdev merged 1 commit into
mainfrom
dev
Apr 20, 2026
Merged

fix redirect() in client components to router.replace()#685
moehdotdev merged 1 commit into
mainfrom
dev

Conversation

@moehdotdev

Copy link
Copy Markdown
Member

followed up on the issue flagged in the last pr redirect() is a server-only function and was being called in client components.

NoteSettingsSidbar.tsx
replaced redirect("/home") with router.replace("/home"). imported useRouter and added the router instance.

WorkingSpaceSettingsSidbar.tsx
same fix redirect("/home") to router.replace("/home"). also removed the setTimeout(400) delay that was in the workspace deletion path it was just a workaround to avoid the broken redirect.

@vercel

vercel Bot commented Apr 20, 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 Apr 20, 2026 11:47am

@moehdotdev moehdotdev merged commit dc8cb06 into main Apr 20, 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