diff options
| -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"; |
