From 1bbbe31500a301d11a96a01c583600e418cfb1fd Mon Sep 17 00:00:00 2001 From: nessi Date: Sun, 2 Aug 2026 09:21:01 +0200 Subject: [PATCH] Hide game sheet sections and winner selection until game has started Wrapped WinnerBadge, SheetSection grid, and WinnerCard components in conditional rendering based on `gameStarted` flag derived from game metadata's `started` property. Prevents display of game content in lobby state before host initiates gameplay. --- frontend/src/App.jsx | 60 ++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 516d2fd..35b3d74 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -622,6 +622,7 @@ export default function App() { : []; const isHost = !!(me?.id && gameMeta?.host_user_id && me.id === gameMeta.host_user_id); + const gameStarted = !!gameMeta?.started; return (
@@ -666,38 +667,43 @@ export default function App() { onStartGame={startGame} /> - {/* Sieger Badge: zwischen Spiel und Verdächtigte Person */} - + {gameStarted && ( + + )} setHelpOpen(false)} /> -
- {sections.map((sec) => ( - - ))} -
+ {gameStarted && ( +
+ {sections.map((sec) => ( + + ))} +
+ )} {/* Host-only Winner Auswahl */} - + {gameStarted && ( + + )}