aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/Result/index.tsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/Result/index.tsx b/src/components/Result/index.tsx
index 40a95fb..8fa4323 100644
--- a/src/components/Result/index.tsx
+++ b/src/components/Result/index.tsx
@@ -31,12 +31,11 @@ export function Result({
);
const textForTry = ["Wow!", "Super!", "Congrats!", "Nice!"];
+ const copyResult = React.useCallback(() => {
+ navigator.clipboard.writeText(scoreToEmoji(guesses));
+ }, [guesses]);
if (didGuess) {
- const copyResult = React.useCallback(() => {
- navigator.clipboard.writeText(scoreToEmoji(guesses));
- }, [guesses]);
-
return (
<>
<Styled.ResultTitle>{textForTry[currentTry - 1]}</Styled.ResultTitle>
@@ -65,6 +64,9 @@ export function Result({
{todaysSolution.name}
</Styled.SongTitle>
<YouTube id={todaysSolution.youtubeId} />
+ <Button onClick={copyResult} variant="red">
+ Copy results
+ </Button>
<Styled.TimeToNext>
Try again in {hoursToNextDay}{" "} hours
</Styled.TimeToNext>
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage