fix: keep session when leaving admin

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-05 09:32:30 +02:00
parent 5dedb8fac0
commit e1cb2754c4
2 changed files with 14 additions and 4 deletions
+7 -1
View File
@@ -534,10 +534,16 @@ function App() {
syncRouteFromLocation()
}
const handleBackFromAdmin = () => {
window.history.replaceState({}, document.title, '/')
setIsAdminRoute(false)
syncRouteFromLocation()
}
if (isAdminRoute) {
return (
<div style={{ display: 'contents' }}>
<AdminDashboard />
<AdminDashboard onBack={handleBackFromAdmin} />
</div>
)
}