wip : working on game

This commit is contained in:
2024-12-30 00:02:09 +01:00
parent d92739bbd6
commit 9a0c26dd80
5 changed files with 63 additions and 3 deletions
+18 -1
View File
@@ -1 +1,18 @@
<template>Hello</template>
<script setup lang="ts">
import { useGameStore } from "~/store/game.store";
const route = useRoute();
const gameId = Number(route.params.id);
const gameStore = useGameStore();
const game = await gameStore.fetchGame(gameId);
onBeforeMount(() => {
gameStore.subscribe(gameId);
});
onUnmounted(() => {
gameStore.close();
});
</script>
<template>{{ game }}</template>