From 3fe4c4b995d1f3b1c6c59fba0d96d080c7208329 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Thu, 2 Jan 2025 00:52:45 +0700 Subject: [PATCH] feat: update fixing error --- .../(protected)/contributor/agenda-setting/calender-view.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/[locale]/(protected)/contributor/agenda-setting/calender-view.tsx b/app/[locale]/(protected)/contributor/agenda-setting/calender-view.tsx index a7996eff..6c15973b 100644 --- a/app/[locale]/(protected)/contributor/agenda-setting/calender-view.tsx +++ b/app/[locale]/(protected)/contributor/agenda-setting/calender-view.tsx @@ -130,13 +130,13 @@ const CalendarView = ({ categories }: CalendarViewProps) => { const month = (selectedMonth.getMonth() + 1).toString(); const typeFilter = ""; // Replace with your type filter logic if needed - const response: APIResponse = await getAgendaSettingsList( + const response = await getAgendaSettingsList( year, month, typeFilter ); - if (response.data && Array.isArray(response.data)) { + if (response?.data && Array.isArray(response?.data)) { // Transform API data to match CalendarEvent type const eventsFromAPI: CalendarEvent[] = response?.data?.map((item) => ({ id: item.id.toString(),