Template
wip : working on game
This commit is contained in:
+18
-1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user