diff --git a/src/components/RoundCheckIn/CheckInPage.tsx b/src/components/RoundCheckIn/CheckInPage.tsx index 1aa189b..deb4394 100644 --- a/src/components/RoundCheckIn/CheckInPage.tsx +++ b/src/components/RoundCheckIn/CheckInPage.tsx @@ -57,9 +57,12 @@ const CheckInPage = ({ }; useEffect(() => { - if (ready) return; const findUser = checkInUser.find((user) => requestUser === user); - if (findUser === undefined) return; + if (findUser === undefined) { + setReady(false); + return; + } + setReady(true); }, [checkInUser]); @@ -71,12 +74,14 @@ const CheckInPage = ({ - {players.length !== 0 && players.length === checkInUser.length ? ( + {players.length !== 0 && players.length <= checkInUser.length ? ( <> {players.map((player, idx) => ( - + ))}