diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-06-08 17:23:42 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-06-08 17:23:42 -0700 |
| commit | b70834311d37c0e71e33c2a82b7d863e896b66cc (patch) | |
| tree | bb4f1cee0a0f4f9b8019560fa5e638cf8e0bd0d1 /src/components | |
| parent | 1c2aede0e8a4c985de1c79908e0ef3abc11d2d3e (diff) | |
show indicator on button while submitting daily guess
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Game/index.tsx | 8 |
1 files changed, 6 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({ <Search currentTry={currentTry} setSelectedSong={setSelectedSong} /> <Styled.Buttons> <Button onClick={skip}> - {currentTry === 5 + {isSubmitting + ? "Skipping..." + : currentTry === 5 ? "Give Up" : `Skip +${playTimes[currentTry] / 1000}s`} </Button> <Button variant="green" onClick={guess}> - Submit + {isSubmitting ? "Submitting..." : "Submit"} </Button> </Styled.Buttons> </> |
