From 0669619543401e9602e1d305c6e5ff389ca395ea Mon Sep 17 00:00:00 2001 From: legonzaur Date: Wed, 31 Jul 2024 10:20:48 +0200 Subject: [PATCH] Chore : attempt to reduce loading times --- app.vue | 5 +- components/AnimatedBackground.vue | 28 +- components/PlayerSlot.vue | 2 +- middleware/auth.global.ts | 9 +- netcode/index.ts | 11 +- pages/game.vue | 535 ++++++++++++++++++++++++++++ pages/game/[id].vue | 566 ------------------------------ pages/lobby.vue | 2 +- stores/authStore.ts | 4 +- 9 files changed, 569 insertions(+), 593 deletions(-) create mode 100644 pages/game.vue delete mode 100644 pages/game/[id].vue diff --git a/app.vue b/app.vue index b091bed..15080ed 100644 --- a/app.vue +++ b/app.vue @@ -8,8 +8,6 @@ const nuxtApp = useNuxtApp(); const router = useRouter(); const authStore = useAuthStore(); -await authStore.whoami(); - console.log("compiling cards..."); const app = getCurrentInstance()?.appContext.app; if (!app) { @@ -23,6 +21,9 @@ console.log("compiling done"); useHead({ title: "Héron Realms", }); +onMounted(()=>{ + authStore.whoami(); +})