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:
+2
-4
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user