Centralize duplicated card shell, press animation, and color tokens

Extract the rounded-card shell and button press animation into a shared
CSS module composed by PageFrame, TitleScreen, and all buttons, add color
tokens for repeated values, and load the saved game once on mount.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 00:23:36 -05:00
parent 3b6bd6815d
commit e0a6aed4cf
7 changed files with 49 additions and 59 deletions
+2 -4
View File
@@ -21,10 +21,8 @@ function clearGame() {
}
export default function App() {
const [page, setPage] = useState<Page>(() =>
loadGame() ? 'scoresheet' : 'title'
)
const [game, setGame] = useState<GameState | null>(() => loadGame())
const [game, setGame] = useState<GameState | null>(loadGame)
const [page, setPage] = useState<Page>(() => (game ? 'scoresheet' : 'title'))
function handleNewGame() {
clearGame()