Always await useAccountSession
If this is not done the session is not properly loaded during server side rendering, making it possible for missmatch and bugs to happen.
This commit is contained in:
parent
7f3029aee8
commit
f2ab306338
2 changed files with 2 additions and 3 deletions
|
@ -32,8 +32,7 @@ definePageMeta({
|
|||
middleware: ["authenticated"],
|
||||
});
|
||||
|
||||
const { data: session } = useAccountSession();
|
||||
const { refresh: sessionRefresh } = useAccountSession();
|
||||
const { data: session, refresh: sessionRefresh } = await useAccountSession();
|
||||
|
||||
const timezone = ref(session.value?.account.timezone ?? "");
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const { data: session, refresh: sessionRefresh } = useAccountSession();
|
||||
const { data: session, refresh: sessionRefresh } = await useAccountSession();
|
||||
const { getSubscription, subscribe } = usePushNotification();
|
||||
|
||||
const name = ref("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue