diff --git a/src/components/RoundCheckIn/CallAdminChat.tsx b/src/components/RoundCheckIn/CallAdminChat.tsx index 14bab4c..391c17e 100644 --- a/src/components/RoundCheckIn/CallAdminChat.tsx +++ b/src/components/RoundCheckIn/CallAdminChat.tsx @@ -81,7 +81,7 @@ const CallAdminChat = ({ }, [client]); useEffect(() => { - if (matchMessage.length === 0) return; + if (!matchMessage || matchMessage.length === 0) return; setChats(matchMessage); }, [matchMessage]); diff --git a/src/components/RoundCheckIn/index.tsx b/src/components/RoundCheckIn/index.tsx index 0413a64..776713e 100644 --- a/src/components/RoundCheckIn/index.tsx +++ b/src/components/RoundCheckIn/index.tsx @@ -33,7 +33,7 @@ export interface GetMatchPlayerScoreInfos { requestMatchPlayerId: number; currentMatchRound: number; totalMatchRound: number; - matchPlayerScoreInfos: MatchPlayerScoreInfos[]; + matchPlayerInfos: MatchPlayerScoreInfos[]; matchMessage: MatchMessages[]; } @@ -60,7 +60,7 @@ const RoundCheckIn = ({ channelLink, matchId }: RoundCheckInProps) => { } setMatchPlayers(res.data); - const readyUser = res.data.matchPlayerScoreInfos + const readyUser = res.data.matchPlayerInfos .filter((info) => info.playerStatus === 'READY') .map((info) => info.matchPlayerId); @@ -107,7 +107,7 @@ const RoundCheckIn = ({ channelLink, matchId }: RoundCheckInProps) => { -
{matchPlayers ? matchPlayers.matchPlayerScoreInfos.length : 0}
+
{matchPlayers ? matchPlayers.matchPlayerInfos.length : 0}
@@ -119,13 +119,13 @@ const RoundCheckIn = ({ channelLink, matchId }: RoundCheckInProps) => { participantCheckin()} client={client} matchId={matchId} - players={matchPlayers ? matchPlayers.matchPlayerScoreInfos : []} + players={matchPlayers ? matchPlayers.matchPlayerInfos : []} matchMessage={matchPlayers ? matchPlayers.matchMessage : []} requestUser={matchPlayers ? matchPlayers.requestMatchPlayerId : -1} />