Skip to content

Commit c783596

Browse files
committed
Remove unneeded deps from remote fetch method
1 parent 7793ed1 commit c783596

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/lib/views/Day.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ const Day = () => {
9494
} finally {
9595
triggerLoading(false);
9696
}
97-
}, [triggerLoading, START_TIME, END_TIME, getRemoteEvents, handleState]);
97+
// eslint-disable-next-line react-hooks/exhaustive-deps
98+
}, [getRemoteEvents]);
9899

99100
useEffect(() => {
100101
if (getRemoteEvents instanceof Function) {

src/lib/views/Month.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ const Month = () => {
6363
} finally {
6464
triggerLoading(false);
6565
}
66-
}, [triggerLoading, eachWeekStart, daysList.length, getRemoteEvents, handleState]);
66+
// eslint-disable-next-line react-hooks/exhaustive-deps
67+
}, [daysList.length, getRemoteEvents]);
6768

6869
useEffect(() => {
6970
if (getRemoteEvents instanceof Function) {

src/lib/views/Week.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ const Week = () => {
6969
} finally {
7070
triggerLoading(false);
7171
}
72-
}, [triggerLoading, getRemoteEvents, weekStart, weekEnd, handleState]);
72+
// eslint-disable-next-line react-hooks/exhaustive-deps
73+
}, [getRemoteEvents]);
7374

7475
useEffect(() => {
7576
if (getRemoteEvents instanceof Function) {

0 commit comments

Comments
 (0)