feat: update fixing error
This commit is contained in:
parent
d7b11b2516
commit
3fe4c4b995
|
|
@ -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(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue