[#595] Load less data on call to get calendar details (#608)

This commit is contained in:
Camille Moussu
2026-03-14 06:38:38 +01:00
committed by GitHub
parent 27be9f10ae
commit 57f9693892
8 changed files with 495 additions and 333 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { useAppDispatch, useAppSelector } from "@/app/hooks";
import SettingsPage from "@/features/Settings/SettingsPage";
import { getCalendarRange } from "@/utils/dateUtils";
import { getViewRange } from "@/utils/dateUtils";
import type { CalendarApi } from "@fullcalendar/core";
import CozyBridge from "cozy-external-bridge";
import { useEffect, useMemo, useRef, useState } from "react";
@@ -24,7 +24,7 @@ export default function CalendarLayout() {
// Get current calendar range
if (calendarRef.current) {
const view = calendarRef.current.view;
const calendarRange = getCalendarRange(view.activeStart);
const calendarRange = getViewRange(view.activeStart, view.type);
// Refresh events for selected calendars
await refreshCalendars(