diff --git a/components/modal/tournament/TournamentRegistryModal.tsx b/components/modal/tournament/TournamentRegistryModal.tsx index 15fa81a42..3e1a0d3b5 100644 --- a/components/modal/tournament/TournamentRegistryModal.tsx +++ b/components/modal/tournament/TournamentRegistryModal.tsx @@ -100,14 +100,13 @@ export default function TournamentRegistryModal({ }, [tournamentId]); useEffect(() => { - getTournamentInfo(); getStatus(); setOpenDate(dateToKRLocaleTimeString(new Date(startTime))); setCloseDate(dateToKRLocaleTimeString(new Date(endTime))); }, []); useEffect(() => { - getTournamentInfo(); + if (registState !== 'LOADING') getTournamentInfo(); }, [registState]); const closeModalButtonHandler = () => { @@ -165,7 +164,7 @@ export default function TournamentRegistryModal({ { if (openTournamentId !== undefined) fetchTournamentGames(); + }, [openTournamentId, fetchTournamentGames]); + + useEffect(() => { if (containerRef.current) { const width = containerRef.current.clientWidth; const height = containerRef.current.clientHeight; setContainerSize({ width, height }); } - }, [openTournamentId]); + }, []); return (