feat: update fixing error

This commit is contained in:
hanif salafi 2025-01-02 00:52:45 +07:00
parent d7b11b2516
commit 3fe4c4b995
1 changed files with 2 additions and 2 deletions

View File

@ -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(),