Skip to content

Commit

Permalink
fix : useEffect 의존성 배열 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
rangggu committed Dec 29, 2024
1 parent c284ec1 commit 2473c10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/LandingPage/PartyList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ function PartyList() {
} finally {
setLoading(false);
}
}, [region, nowDate, num, price]);
}, [region, nowDate, num, price, ramdomSeed]);

useEffect(() => {
getData();
window.scrollTo({ top: 0 });
}, [region, nowDate, num, price]);
}, [region, nowDate, num, price, ramdomSeed]);

if (loading) return null;
if (partyData.length === 0 && driverData.length === 0) return <NoParty />;
Expand Down

0 comments on commit 2473c10

Please sign in to comment.