From 54c44003936efdd3ea3a25ef94fcbc7b4acef871 Mon Sep 17 00:00:00 2001 From: jessy-david-dev Date: Sat, 11 Apr 2026 22:30:47 +0200 Subject: [PATCH] feat(multi): add go back button with extra click penalty --- app/components/GameScreen.tsx | 13 ++++++++++++ app/components/ScreenRouter.tsx | 2 ++ lib/useMultiGame.ts | 37 +++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/app/components/GameScreen.tsx b/app/components/GameScreen.tsx index 58ef36a..a171c0c 100644 --- a/app/components/GameScreen.tsx +++ b/app/components/GameScreen.tsx @@ -18,6 +18,8 @@ type GameScreenProps = { elapsed: string; countdown: number | null; onNavigate: (title: string) => void; + onGoBack: () => void; + canGoBack: boolean; onRetry: () => void; onNextRound: () => void; onResetGame: () => void; @@ -36,6 +38,8 @@ export function GameScreen({ elapsed, countdown, onNavigate, + onGoBack, + canGoBack, onRetry, onNextRound, onResetGame, @@ -262,6 +266,15 @@ export function GameScreen({ {clicks} clics {myPlayer?.score ?? 0} pts + {!myFinished && canGoBack && ( + + )} {!myFinished && (