Skip to content

Commit

Permalink
fix: new game modal
Browse files Browse the repository at this point in the history
  • Loading branch information
cjkoepke committed Dec 2, 2024
1 parent 69db8e0 commit 82d83cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const Modal: FC<ModalProps> = ({ isOpen, close, children }) => {
alt="Noise"
className="absolute inset-0 w-full h-full object-cover z-10 opacity-20"
/>
<div className="relative z-20 text-shadow-custom max-h-screen overflow-y-auto">
<div className="relative z-20 py-4 text-shadow-custom max-h-screen overflow-y-auto">
{children}
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/components/SetNameModal/SetNameModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const SetNameModal: FC<SetNameModalProps> = ({
bots,
gameData,
players,
region,
setBots,
setGameData,
setPlayers,
Expand Down Expand Up @@ -60,7 +61,9 @@ const SetNameModal: FC<SetNameModalProps> = ({
};

const isButtonDisabled =
(title === "Join Multiplayer" && !gameData.code) || !gameData.petName;
(title === "Join Multiplayer" && !gameData.code) ||
!gameData.petName ||
(title === "New Game" && !region);

return (
<Modal isOpen={isOpen} close={close}>
Expand Down

0 comments on commit 82d83cb

Please sign in to comment.