More things
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
on the server as much as in the browser. So a stored session is checked here,
|
||||
once, before any page runs. With no cookie in the request it costs nothing. */
|
||||
export default defineNuxtPlugin(async () => {
|
||||
const appLocale = useAppLocale()
|
||||
const { user, restoreSession } = useAuth()
|
||||
await restoreSession()
|
||||
|
||||
@@ -11,5 +12,5 @@ export default defineNuxtPlugin(async () => {
|
||||
follows the person — so the very first render speaks it. (setLocale keeps
|
||||
the detection cookie in step, so the next load starts there even before
|
||||
this runs.) */
|
||||
if (user.value?.locale) await useAppLocale().applyAccount(user.value.locale)
|
||||
if (user.value?.locale) await appLocale.applyAccount(user.value.locale)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user