fix: keep session when leaving admin
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+7
-1
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user