fix: Improve browser navigation and prevent login page in history
- Fix back button redirecting to login page when authenticated - Add browser history management for SPA navigation between sections - Use window.location.replace() to prevent login page in history - Add URL hash support for bookmarkable sections
This commit is contained in:
+2
-2
@@ -255,8 +255,8 @@
|
||||
// Store token
|
||||
localStorage.setItem('authToken', data.token);
|
||||
|
||||
// Redirect to main app
|
||||
window.location.href = '/';
|
||||
// Redirect to main app (replace history to prevent back button issues)
|
||||
window.location.replace('/');
|
||||
|
||||
} catch (err) {
|
||||
errorMessage.textContent = err.message;
|
||||
|
||||
Reference in New Issue
Block a user