feat: redirect unauthenticated users from profile pages to home, fix auth timing on page refresh
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user