From b70834311d37c0e71e33c2a82b7d863e896b66cc Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 8 Jun 2026 17:23:42 -0700 Subject: show indicator on button while submitting daily guess --- src/components/Game/index.tsx | 8 ++++++-- src/hooks/useGameState.ts | 1 + src/pages/DailyPage.tsx | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/Game/index.tsx b/src/components/Game/index.tsx index 657b2af..8afa516 100644 --- a/src/components/Game/index.tsx +++ b/src/components/Game/index.tsx @@ -19,6 +19,7 @@ interface Props { guess: () => void; mode?: "daily" | "unlimited"; onPlayAgain?: () => void; + isSubmitting?: boolean; } function getUtcDate() { @@ -36,6 +37,7 @@ export function Game({ guess, mode = "daily", onPlayAgain, + isSubmitting = false, }: Props) { const recentFinishedPlay = localStorage.getItem("recentFinishedPlay"); const hasFinishedCurrentRound = didGuess || currentTry >= guesses.length; @@ -110,12 +112,14 @@ export function Game({ diff --git a/src/hooks/useGameState.ts b/src/hooks/useGameState.ts index 7ef7683..c6bf6f7 100644 --- a/src/hooks/useGameState.ts +++ b/src/hooks/useGameState.ts @@ -339,5 +339,6 @@ export function useGameState({ skip, guess, reset, + isSubmitting }; } diff --git a/src/pages/DailyPage.tsx b/src/pages/DailyPage.tsx index d1482b1..17efaeb 100644 --- a/src/pages/DailyPage.tsx +++ b/src/pages/DailyPage.tsx @@ -69,6 +69,7 @@ export function DailyPage() { didGuess, skip, guess, + isSubmitting, } = useGameState({ solution: todaysSolution?.song ?? null, persist: true, @@ -109,6 +110,7 @@ export function DailyPage() { setSelectedSong={setSelectedSong} skip={skip} guess={guess} + isSubmitting={isSubmitting} />