feat : lobby

This commit is contained in:
2024-12-29 23:39:15 +01:00
parent e0ece631d3
commit d92739bbd6
14 changed files with 313 additions and 203 deletions
+12 -6
View File
@@ -1,12 +1,18 @@
<script setup lang="ts">
import { useUserStore } from '~/store/user.store';
import { useUserStore } from "~/store/user.store";
import { useLobbyStore } from "./store/lobby.store";
const userStore = useUserStore();
const lobbyStore = useLobbyStore();
userStore.whoami();
lobbyStore.fetchGames();
onBeforeMount(() => {
lobbyStore.subscribe();
});
const req = await userStore.whoami()
onBeforeUnmount(() => {
lobbyStore.close();
});
</script>
<template>
@@ -14,7 +20,7 @@ const req = await userStore.whoami()
<NuxtRouteAnnouncer />
<NuxtLayout>
<NuxtLoadingIndicator> Loading... </NuxtLoadingIndicator>
<Header />
<ConceptHeader />
<NuxtPage />
</NuxtLayout>
</div>