Live location tracking and playback for the game "manhunt"

Don't prompt when leaving an empty lobby

bwc9876.dev 7d4959da fc568f1d

verified
+6
+6
frontend/src/components/LobbyScreen.tsx
··· 101 101 const isSeeker = lobbyState.teams[lobbyState.self_id] ?? false; 102 102 103 103 const onLeaveLobby = () => { 104 + // Don't prompt since the lobby is empty (besides us obv) 105 + // <= even though it should never be 0... hopefully.... 106 + if (lobbyState.is_host && profiles.length <= 1) { 107 + commands.quitToMenu(); 108 + return; 109 + } 104 110 const hostMsg = lobbyState.is_host ? " You are the host so this will cancel the lobby" : ""; 105 111 106 112 const msg = `Are you sure you want to leave this lobby?${hostMsg}`;