444 use websocket to trigger reloads (#458)

* [#444] added refresh on sync token calendar update

* [#444] added refresh on register and tests

* [#444] extracted logic for useEffects and updates

* [#444] refactored code structure to use absolute paths
This commit is contained in:
Camille Moussu
2026-01-19 09:09:23 +01:00
committed by GitHub
parent 80110bdf52
commit 00c3c0d6f0
32 changed files with 849 additions and 163 deletions
+17
View File
@@ -0,0 +1,17 @@
import { RootState } from "../app/store";
import { Calendar } from "../features/Calendars/CalendarTypes";
export function findCalendarById(
state: Partial<RootState>,
calendarId: string
): { calendar: Calendar; type?: "temp" } | undefined {
if (calendarId.length === 0) {
return;
}
if (state.calendars?.list?.[calendarId]) {
return { calendar: state.calendars.list[calendarId] };
}
if (state.calendars?.templist?.[calendarId]) {
return { calendar: state.calendars.templist[calendarId], type: "temp" };
}
}