diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-08 14:43:21 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-08 14:43:21 +0900 |
| commit | bb844de6a8acdbc5d4fbffbd74daa54e6dd19efe (patch) | |
| tree | 168bd54e71a4d533bf3b2a9c5edb6c841503c06f | |
| parent | 9e9e7e685e04d6baac13906c0dd0aa2afd59eefc (diff) | |
| download | iosdc-japan-2025-albatross-bb844de6a8acdbc5d4fbffbd74daa54e6dd19efe.tar.gz iosdc-japan-2025-albatross-bb844de6a8acdbc5d4fbffbd74daa54e6dd19efe.tar.zst iosdc-japan-2025-albatross-bb844de6a8acdbc5d4fbffbd74daa54e6dd19efe.zip | |
fix
| -rw-r--r-- | backend/api/handler.go | 3 | ||||
| -rw-r--r-- | frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/backend/api/handler.go b/backend/api/handler.go index 949c610..4896a28 100644 --- a/backend/api/handler.go +++ b/backend/api/handler.go @@ -5,6 +5,7 @@ import ( "errors" "log" "net/http" + "strconv" "github.com/jackc/pgx/v5" "github.com/labstack/echo/v4" @@ -230,7 +231,7 @@ func (h *Handler) GetGameWatchLatestStates(ctx context.Context, request GetGameW } else { status = None } - states[string(row.UserID)] = LatestGameState{ + states[strconv.Itoa(int(row.UserID))] = LatestGameState{ Code: code, Score: score, Status: status, diff --git a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx index 226e1e2..ec18bbc 100644 --- a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx +++ b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx @@ -30,11 +30,11 @@ export default function GolfWatchAppGaming1v1({ const leftTimeSeconds = useAtomValue(gamingLeftTimeSecondsAtom)!; const latestGameStates = useAtomValue(latestGameStatesAtom); - const stateA = latestGameStates[playerProfileA.id]; + const stateA = latestGameStates[`${playerProfileA.id}`]; const codeA = stateA?.code ?? ""; const scoreA = stateA?.score ?? null; const statusA = stateA?.status ?? "none"; - const stateB = latestGameStates[playerProfileB.id]; + const stateB = latestGameStates[`${playerProfileB.id}`]; const codeB = stateB?.code ?? ""; const scoreB = stateB?.score ?? null; const statusB = stateB?.status ?? "none"; |
