Skip to content

Commit

Permalink
Update Allow Spectator Button
Browse files Browse the repository at this point in the history
  • Loading branch information
PvtVoid committed May 7, 2024
1 parent 84fb334 commit ccd96ef
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down Expand Up @@ -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);
};

Expand Down Expand Up @@ -168,7 +166,7 @@ const OptionsContent = () => {
</div>
<h3>Invite Spectators</h3>
<div className={styles.buttonColumn}>
{isPrivateLobby && !allowSpectator ? (
{!allowSpectator ? (
<>
<button
style={{ marginTop: '0.5em' }}
Expand Down

0 comments on commit ccd96ef

Please sign in to comment.