diff --git a/site/src/components/Game.vue b/site/src/components/Game.vue index 6db9f6c..bdacbbf 100644 --- a/site/src/components/Game.vue +++ b/site/src/components/Game.vue @@ -86,9 +86,9 @@ const timestamp = useTimestamp({ }, interval: 60, }); -watch(props.game, (now) => { - initTimeLeft.value = now.deadline - timestamp.value; - console.log(initTimeLeft, now.deadline, timestamp.value); +watch(() => props.game.deadline, (now) => { + initTimeLeft.value = now - timestamp.value; + console.log(initTimeLeft, now, timestamp.value); }); const moveColor = computed(() => timeLeft.value > 3000 ? 'primary' : 'red');