mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-11 05:56:46 +03:00
feat: enhance navigation handling by updating navigation key and improving page state management
This commit is contained in:
@@ -74,6 +74,8 @@ function AppWithProviders({ page: initialPage }: AppProps) {
|
||||
|
||||
const pageName = pageMap[path] || 'dashboard';
|
||||
setCurrentPage(pageName);
|
||||
// Also increment navigation key for browser navigation to trigger loading states
|
||||
setNavigationKey(prev => prev + 1);
|
||||
};
|
||||
|
||||
window.addEventListener('popstate', handlePopState);
|
||||
|
||||
Reference in New Issue
Block a user