From b19215730e8f2f892b77ffcb348e07b6fa272286 Mon Sep 17 00:00:00 2001
From: Brendan F <EpicWolverine@users.noreply.github.com>
Date: Sun, 14 May 2023 23:27:46 -0700
Subject: Add copying results on failure

---
 src/components/Result/index.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'src/components/Result/index.tsx')

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>
-- 
cgit v1.2.3

