[#21] changed react-script to rebuild

This commit is contained in:
Camille Moussu
2025-07-03 14:48:19 +02:00
parent 65621924a2
commit 47fad76217
13 changed files with 2834 additions and 7259 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { cp } from "node:fs";
export async function getCalendars(userId: string, opaque_token: string) {
const response = await fetch(
`${process.env.REACT_APP_CALENDAR_BASE_URL}/dav/calendars/${userId}.json?personal=true&sharedDelegationStatus=accepted&sharedPublicSubscription=true&withRights=true`,
`${process.env.PUBLIC_CALENDAR_BASE_URL}/dav/calendars/${userId}.json?personal=true&sharedDelegationStatus=accepted&sharedPublicSubscription=true&withRights=true`,
{
headers: {
Accept: "application/calendar+json",
@@ -16,7 +16,7 @@ export async function getCalendars(userId: string, opaque_token: string) {
export async function getCalendar(id: string, opaque_token: string) {
const response = await fetch(
`${process.env.REACT_APP_CALENDAR_BASE_URL}/dav/calendars/${id}/${id}.json`,
`${process.env.PUBLIC_CALENDAR_BASE_URL}/dav/calendars/${id}/${id}.json`,
{
method: "REPORT",
headers: {
-4
View File
@@ -58,7 +58,6 @@ const CalendarSlice = createSlice({
state,
action: PayloadAction<{ calendarUid: string; event: CalendarEvent }>
) => {
console.log(action.payload);
if (!state[action.payload.calendarUid].events) {
state[action.payload.calendarUid].events = [];
}
@@ -81,10 +80,7 @@ const CalendarSlice = createSlice({
builder.addCase(
getCalendarsAsync.fulfilled,
(state, action: PayloadAction<Record<string, Calendars>>) => {
console.log("ony est!!!!: ", action.payload);
console.log(Object.keys(action.payload));
Object.keys(action.payload).forEach((id) => {
console.log(id);
state[id] = action.payload[id];
});
}