[#21] changed react-script to rebuild
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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];
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user