diff --git a/apps/web/src/components/PageWithNav.tsx b/apps/web/src/components/PageWithNav.tsx index a5ff620a..a05150c7 100644 --- a/apps/web/src/components/PageWithNav.tsx +++ b/apps/web/src/components/PageWithNav.tsx @@ -11,11 +11,13 @@ interface PageWithNavProps { navEmoji?: string emphasizeGameContext?: boolean onExitSession?: () => void + onSetup?: () => void + onNewGame?: () => void canModifyPlayers?: boolean children: React.ReactNode } -export function PageWithNav({ navTitle, navEmoji, emphasizeGameContext = false, onExitSession, canModifyPlayers = true, children }: PageWithNavProps) { +export function PageWithNav({ navTitle, navEmoji, emphasizeGameContext = false, onExitSession, onSetup, onNewGame, canModifyPlayers = true, children }: PageWithNavProps) { const { players, activePlayers, setActive, activePlayerCount } = useGameMode() const [mounted, setMounted] = React.useState(false) const [configurePlayerId, setConfigurePlayerId] = React.useState(null) @@ -73,6 +75,8 @@ export function PageWithNav({ navTitle, navEmoji, emphasizeGameContext = false, onRemovePlayer={handleRemovePlayer} onConfigurePlayer={handleConfigurePlayer} onExitSession={onExitSession} + onSetup={onSetup} + onNewGame={onNewGame} canModifyPlayers={canModifyPlayers} /> ) : null diff --git a/apps/web/src/components/nav/GameContextNav.tsx b/apps/web/src/components/nav/GameContextNav.tsx index e3ee07f8..8df5050f 100644 --- a/apps/web/src/components/nav/GameContextNav.tsx +++ b/apps/web/src/components/nav/GameContextNav.tsx @@ -3,6 +3,7 @@ import { GameModeIndicator } from './GameModeIndicator' import { ActivePlayersList } from './ActivePlayersList' import { AddPlayerButton } from './AddPlayerButton' import { FullscreenPlayerSelection } from './FullscreenPlayerSelection' +import { GameControlButtons } from './GameControlButtons' type GameMode = 'none' | 'single' | 'battle' | 'tournament' @@ -24,6 +25,8 @@ interface GameContextNavProps { onRemovePlayer: (playerId: string) => void onConfigurePlayer: (playerId: string) => void onExitSession?: () => void + onSetup?: () => void + onNewGame?: () => void canModifyPlayers?: boolean } @@ -39,6 +42,8 @@ export function GameContextNav({ onRemovePlayer, onConfigurePlayer, onExitSession, + onSetup, + onNewGame, canModifyPlayers = true }: GameContextNavProps) { const [isTransitioning, setIsTransitioning] = React.useState(false) @@ -97,39 +102,13 @@ export function GameContextNav({ showFullscreenSelection={showFullscreenSelection} /> - {/* Exit Session / Return to Arcade Button - only show during active game */} - {onExitSession && !showFullscreenSelection && !canModifyPlayers && ( - + {/* Game Control Buttons - only show during active game */} + {!showFullscreenSelection && !canModifyPlayers && ( + )} {/* Active Players + Add Button */}