From 14172f9dd64ce91ba5cf51f82c53deb6a81d68a6 Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Wed, 3 Jun 2026 17:22:48 -0700
Subject: create daily/unlimited mode, CDN audio file for daily mode

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

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

diff --git a/src/components/Result/index.tsx b/src/components/Result/index.tsx
index 19f9386..6b4560a 100644
--- a/src/components/Result/index.tsx
+++ b/src/components/Result/index.tsx
@@ -14,17 +14,19 @@ interface SolutionProps {
   didGuess: boolean;
   currentTry: number;
   todaysSolution: Song;
+  isUnlimited?: boolean;
 }
 
 function Solution({
   didGuess,
   todaysSolution,
   currentTry,
+  isUnlimited,
 }: SolutionProps) {
   return (
     <>
       <Styled.SongTitle>
-        Today&apos;s song is {todaysSolution.artist} - {todaysSolution.name}
+        {isUnlimited ? "The song was" : "Today's song is"} {todaysSolution.artist} - {todaysSolution.name}
       </Styled.SongTitle>
 
       {didGuess && (
@@ -86,6 +88,8 @@ interface Props {
   currentTry: number;
   todaysSolution: Song;
   guesses: GuessType[];
+  mode?: "daily" | "unlimited";
+  onPlayAgain?: () => void;
 }
 
 export function Result({
@@ -93,6 +97,8 @@ export function Result({
   todaysSolution,
   guesses,
   currentTry,
+  mode = "daily",
+  onPlayAgain,
 }: Props) {
   const hoursToNextDay = Math.floor(
     (new Date(new Date().setHours(24, 0, 0, 0)).getTime() -
@@ -102,6 +108,8 @@ export function Result({
       60
   );
 
+  const isUnlimited = mode === "unlimited";
+
   if (didGuess) {
     const textForTry = ["Perfect!", "Wow!", "Super!", "Congrats!", "Nice!"];
 
@@ -113,13 +121,20 @@ export function Result({
           todaysSolution={todaysSolution}
           didGuess={didGuess}
           currentTry={currentTry}
+          isUnlimited={isUnlimited}
         />
 
-        <ShareButton guesses={guesses} variant="green" />
-
-        <Styled.TimeToNext>
-          Remember to come back in {hoursToNextDay} hours!
-        </Styled.TimeToNext>
+        {!isUnlimited && <ShareButton guesses={guesses} variant="green" />}
+
+        {isUnlimited && onPlayAgain ? (
+          <Button variant="green" onClick={onPlayAgain}>
+            Play Again
+          </Button>
+        ) : (
+          <Styled.TimeToNext>
+            Remember to come back in {hoursToNextDay} hours!
+          </Styled.TimeToNext>
+        )}
       </>
     );
   }
@@ -132,13 +147,20 @@ export function Result({
         todaysSolution={todaysSolution}
         didGuess={didGuess}
         currentTry={currentTry}
+        isUnlimited={isUnlimited}
       />
 
-      <ShareButton guesses={guesses} variant="red" />
+      {!isUnlimited && <ShareButton guesses={guesses} variant="red" />}
 
-      <Styled.TimeToNext>
-        Try again in {hoursToNextDay} hours.
-      </Styled.TimeToNext>
+      {isUnlimited && onPlayAgain ? (
+        <Button variant="red" onClick={onPlayAgain}>
+          Play Again
+        </Button>
+      ) : (
+        <Styled.TimeToNext>
+          Try again in {hoursToNextDay} hours.
+        </Styled.TimeToNext>
+      )}
     </>
   );
 }
-- 
cgit v1.2.3

