Skip to content

Commit 048df4f

Browse files
author
Nevo David
committed
feat: it will auto load the new filters
1 parent 9974e71 commit 048df4f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

apps/frontend/src/components/launches/calendar.context.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ export const CalendarWeekProvider: FC<{
109109
}, [filters]);
110110

111111
const loadData = useCallback(
112-
async (url: string) => {
113-
const data = (await fetch(`/posts${url}?${params}`)).json();
112+
async () => {
113+
const data = (await fetch(`/posts?${params}`)).json();
114114
return data;
115115
},
116116
[filters, params]
@@ -141,9 +141,6 @@ export const CalendarWeekProvider: FC<{
141141
: `month=${filters.currentMonth}`
142142
}&year=${filters.currentYear}`
143143
);
144-
setTimeout(() => {
145-
swr.mutate();
146-
}, 10);
147144
},
148145
[filters, swr.mutate]
149146
);

0 commit comments

Comments
 (0)