Skip to content

Commit

Permalink
fix: only set start week when enrolled courses length changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsun969 committed Sep 28, 2024
1 parent 0b772fc commit 6647151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const useCalendar = () => {
if (enrolledCourses.length === 0) return;
setCurrentWeek(startWeek);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [enrolledCourses.length, startWeek.format('MMDD')]);
}, [enrolledCourses.length]);

useEffect(() => {
if (currentWeek.isBefore(startWeek)) {
Expand Down

0 comments on commit 6647151

Please sign in to comment.