aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Game/index.tsx8
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>
</>
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage