feat: redirect unauthenticated users from profile pages to home, fix auth timing on page refresh

This commit is contained in:
2026-02-04 14:31:25 +01:00
parent 7f40dc1e9b
commit 0830af9c0e
5 changed files with 43 additions and 31 deletions

View File

@@ -1,4 +1,5 @@
import { i18n } from './i18n.js'
import { auth } from './services/auth.js'
import { setupGlobalErrorHandler } from './components/error-boundary.js'
async function initApp() {
@@ -11,6 +12,9 @@ async function initApp() {
}
await i18n.init()
// Restore auth session before loading components
await auth.tryRestoreSession()
await import('./components/app-shell.js')