From ccd96ef6516d08e6344af0e1503f12ad09b3e3ec Mon Sep 17 00:00:00 2001 From: PvtVoid Date: Tue, 7 May 2024 15:49:11 +0200 Subject: [PATCH] Update Allow Spectator Button --- .../game/components/elements/optionsMenu/OptionsMenu.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/routes/game/components/elements/optionsMenu/OptionsMenu.tsx b/src/routes/game/components/elements/optionsMenu/OptionsMenu.tsx index d7b167855..6f92d05dd 100644 --- a/src/routes/game/components/elements/optionsMenu/OptionsMenu.tsx +++ b/src/routes/game/components/elements/optionsMenu/OptionsMenu.tsx @@ -18,7 +18,7 @@ import OptionsSettings from './OptionsSettings'; import { shallowEqual } from 'react-redux'; const OptionsContent = () => { - const { gameID, playerID, isPrivateLobby } = useAppSelector( + const { gameID, playerID } = useAppSelector( getGameInfo, shallowEqual ); @@ -80,9 +80,7 @@ const OptionsContent = () => { }; const handleAllowSpectators = () => { - dispatch( - submitButton({ button: { mode: PROCESS_INPUT.ALLOW_SPECTATORS } }) - ); + dispatch(submitButton({ button: { mode: PROCESS_INPUT.ALLOW_SPECTATORS } })); setAllowSpectator(true); }; @@ -168,7 +166,7 @@ const OptionsContent = () => {

Invite Spectators

- {isPrivateLobby && !allowSpectator ? ( + {!allowSpectator ? ( <>