From 5fe3826f2a37e5b18add099bb847adbede904007 Mon Sep 17 00:00:00 2001
From: Sterling Archer
Date: Sun, 14 Jun 2026 23:10:04 -0700
Subject: [PATCH] Fix splash cards: move hover state into proper React
component
---
index.html | 67 ++++++++++++++++++++++++++++++------------------------
1 file changed, 37 insertions(+), 30 deletions(-)
diff --git a/index.html b/index.html
index 5cb52ce..b3d873d 100644
--- a/index.html
+++ b/index.html
@@ -1439,6 +1439,38 @@ function GuitarTuner({ onBack, onGoTuner, onGoBasics, onGoSongSearch }) {
);
}
+
+function SplashCards({ onTuner, onBasics, onSearch }) {
+ const [hovered, setHovered] = useState(null);
+ const cards = [
+ {key:"tuner", icon:"🎵", title:"Tune your guitar", desc:"Get in tune before you play. Pluck a string and the tuner guides you.", action:onTuner},
+ {key:"basics", icon:"📖", title:"Start from basics", desc:"New to guitar? Learn step by step from the very beginning.", action:onBasics},
+ {key:"search", icon:"🔍", title:"Search any song", desc:"Already know the basics? Find a song and play along with the mic.", action:onSearch},
+ ];
+ return (
+
+ {cards.map(({key,icon,title,desc,action})=>(
+
setHovered(key)}
+ onMouseLeave={()=>setHovered(null)}
+ style={{background:C.bg2,
+ border:"1px solid "+(hovered===key?C.sage:C.amber),
+ borderRadius:16,padding:"20px 22px",
+ cursor:"pointer",textAlign:"left",fontFamily:"sans-serif",
+ display:"flex",alignItems:"center",gap:18,
+ transition:"border-color 0.2s"}}>
+ {icon}
+
+ ›
+
+ ))}
+
+ );
+}
+
function App() {
const [splash, setSplash] = useState(true);
const [showTuner, setShowTuner] = useState(false);
@@ -1547,36 +1579,11 @@ function App() {
- {(()=>{
- const [hovered, setHovered] = React.useState(null);
- const cards = [
- {key:"tuner", icon:"🎵", title:"Tune your guitar", desc:"Get in tune before you play. Pluck a string and the tuner guides you.", action:()=>setShowTuner(true)},
- {key:"basics", icon:"📖", title:"Start from basics", desc:"New to guitar? Learn step by step from the very beginning.", action:()=>go(0)},
- {key:"search", icon:"🔍", title:"Search any song", desc:"Already know the basics? Find a song and play along with the mic.", action:()=>go(7)},
- ];
- return (
-
- {cards.map(({key,icon,title,desc,action})=>(
-
setHovered(key)}
- onMouseLeave={()=>setHovered(null)}
- style={{background:C.bg2,
- border:"1px solid "+(hovered===key?C.sage:C.amber),
- borderRadius:16,padding:"20px 22px",
- cursor:"pointer",textAlign:"left",fontFamily:"sans-serif",
- display:"flex",alignItems:"center",gap:18,
- transition:"border-color 0.2s"}}>
- {icon}
-
- ›
-
- ))}
-
- );
- })()}
+ setShowTuner(true)}
+ onBasics={()=>go(0)}
+ onSearch={()=>go(7)}
+ />