mirror of
https://github.com/Pandipipas/scoreko-dev.git
synced 2026-06-06 11:42:06 +00:00
Fix replicant reactivity for scoreboard
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useHead } from '@unhead/vue';
|
||||
import { computed } from 'vue';
|
||||
import type { Ref } from 'vue';
|
||||
import { playersReplicant, scoreboardReplicant } from '../../browser_shared/replicants';
|
||||
import type { Schemas } from '../../types';
|
||||
|
||||
@@ -17,11 +16,8 @@ const defaultScoreboard: Schemas.Scoreboard = {
|
||||
round: '',
|
||||
};
|
||||
|
||||
const playersData = playersReplicant?.data as unknown as Ref<Schemas.Players | undefined> | undefined;
|
||||
const scoreboardData = scoreboardReplicant?.data as unknown as Ref<Schemas.Scoreboard | undefined> | undefined;
|
||||
|
||||
const players = computed<Schemas.Players>(() => playersData?.value ?? {});
|
||||
const scoreboard = computed<Schemas.Scoreboard>(() => scoreboardData?.value ?? defaultScoreboard);
|
||||
const players = computed<Schemas.Players>(() => playersReplicant?.data ?? {});
|
||||
const scoreboard = computed<Schemas.Scoreboard>(() => scoreboardReplicant?.data ?? defaultScoreboard);
|
||||
|
||||
const leftName = computed(() => {
|
||||
if (scoreboard.value.leftNameOverride) {
|
||||
|
||||
Reference in New Issue
Block a user