From d349924695a9fdd75bc8a7f45a8512f2e8e7245c Mon Sep 17 00:00:00 2001 From: "corey@blaishome.online" Date: Thu, 13 Feb 2025 22:51:56 -0500 Subject: [PATCH] Working with menu button --- asc/src/components/ScoreTracker.js | 45 ++++++++++++++---------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/asc/src/components/ScoreTracker.js b/asc/src/components/ScoreTracker.js index bbe62f8..6baf145 100644 --- a/asc/src/components/ScoreTracker.js +++ b/asc/src/components/ScoreTracker.js @@ -21,15 +21,11 @@ const ScoreTracker = () => { }; // Handle Add Round, Game Completion, etc. - const handleGameEnd = () => { // Navigate to the summary page after the game ends navigate('/summary'); }; - // Rest of your component code (Rendering, Button handlers, etc.) -}; - // Handle adding a round const handleAddRound = () => { // Check if the max number of rounds is reached @@ -148,13 +144,12 @@ const ScoreTracker = () => { > X - - @@ -185,25 +180,27 @@ const ScoreTracker = () => { Bullseyes: {state.currentGame.totalBullseyes} -{/* Round history */} - - - {state.currentGame && state.currentGame.rounds && state.currentGame.rounds.length > 0 ? ( - state.currentGame.rounds.map((round, roundIndex) => ( - - Round {roundIndex + 1}: {round.arrows ? round.arrows.join(', ') : 'No arrows'} - (Total: {round.total || 0}, Bullseyes: {round.bullseyes || 0}) - - )) - ) : ( - - No rounds played yet. - - )} - - - + + {/* Round history */} + + + {state.currentGame && state.currentGame.rounds && state.currentGame.rounds.length > 0 ? ( + state.currentGame.rounds.map((round, roundIndex) => ( + + Round {roundIndex + 1}: {round.arrows ? round.arrows.join(', ') : 'No arrows'} + (Total: {round.total || 0}, Bullseyes: {round.bullseyes || 0}) + + )) + ) : ( + + No rounds played yet. + + )} + + + ); }; export default ScoreTracker; +