fix: org-settings redirect uses router.back() to stay on current page

This commit is contained in:
Usman Baig
2026-03-26 11:11:13 +01:00
parent b352fa00e4
commit 97b9486382

View File

@@ -22,8 +22,9 @@ function OrgSettingsInner() {
}
const mappedTab = tab ? tabMap[tab] || 'general' : 'general'
router.replace('/')
setTimeout(() => openUnifiedSettings({ context: 'workspace', tab: mappedTab }), 100)
// Go back to wherever the user came from (not always /)
router.back()
setTimeout(() => openUnifiedSettings({ context: 'workspace', tab: mappedTab }), 200)
}, [searchParams, router, openUnifiedSettings])
return (