diff --git a/src/lib/Room.svelte b/src/lib/Room.svelte index 9f0ac1e..ff20447 100644 --- a/src/lib/Room.svelte +++ b/src/lib/Room.svelte @@ -12,7 +12,6 @@ let { room }: { room: Room } = $props(); let roomTimer = $state(room.secondsRemaining); - let players = $state(room.players); onMount(() => { if (!room.finished) { @@ -30,7 +29,7 @@ .get(`/api/room/${room.roomId}`) .then((result) => result.data); roomTimer = updatedRoom.secondsRemaining; - players = updatedRoom.players; + room.players = updatedRoom.players; if (updatedRoom.finished) { console.log('killing invervals'); clearInterval(roomTimerUpdateInterval); @@ -72,7 +71,7 @@

- {#each players as player} + {#each room.players as player} {/each}