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:
Yuri
2026-01-03 07:06:08 -05:00
parent 55c9a796b4
commit fb176412f0
2 changed files with 28 additions and 8 deletions
+2 -2
View File
@@ -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;