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 month = (selectedMonth.getMonth() + 1).toString();
const typeFilter = ""; // Replace with your type filter logic if needed const typeFilter = ""; // Replace with your type filter logic if needed
const response: APIResponse = await getAgendaSettingsList( const response = await getAgendaSettingsList(
year, year,
month, month,
typeFilter typeFilter
); );
if (response.data && Array.isArray(response.data)) { if (response?.data && Array.isArray(response?.data)) {
// Transform API data to match CalendarEvent type // Transform API data to match CalendarEvent type
const eventsFromAPI: CalendarEvent[] = response?.data?.map((item) => ({ const eventsFromAPI: CalendarEvent[] = response?.data?.map((item) => ({
id: item.id.toString(), id: item.id.toString(),