diff --git a/__test__/features/Calendars/CalendarAPI.test.tsx b/__test__/features/Calendars/CalendarAPI.test.tsx index a8fd40b..c17e69c 100644 --- a/__test__/features/Calendars/CalendarAPI.test.tsx +++ b/__test__/features/Calendars/CalendarAPI.test.tsx @@ -62,7 +62,7 @@ describe("Calendar API", () => { it("postCalendar", async () => { const calId = "calId"; const userId = "userId"; - const color = "calId"; + const color = { light: "calId" }; const name = "new cal"; const desc = "desc"; diff --git a/src/components/Calendar/CalendarSearch.tsx b/src/components/Calendar/CalendarSearch.tsx index 9880ef2..12ebed5 100644 --- a/src/components/Calendar/CalendarSearch.tsx +++ b/src/components/Calendar/CalendarSearch.tsx @@ -211,10 +211,7 @@ export default function CalendarSearch({ calId, cal: { ...cal, - color: { - light: cal.cal["apple:color"], - dark: cal.cal["X-TWAKE-Dark-theme-color"], - }, + color: cal.cal["apple:color"], }, }) ); diff --git a/src/components/Calendar/utils/calendarColorsUtils.tsx b/src/components/Calendar/utils/calendarColorsUtils.tsx index c039e41..209c536 100644 --- a/src/components/Calendar/utils/calendarColorsUtils.tsx +++ b/src/components/Calendar/utils/calendarColorsUtils.tsx @@ -37,7 +37,6 @@ export function getAccessiblePair(baseColor: string, theme: Theme): string { // Check if contrast meets 4.5 const contrast = getContrastRatio(baseColor, adjusted); - console.log(isLight, contrast); if (contrast >= 4.5) return adjusted; if (isLight) { diff --git a/src/features/Calendars/CalendarApi.ts b/src/features/Calendars/CalendarApi.ts index 06d6f7c..0aff59f 100644 --- a/src/features/Calendars/CalendarApi.ts +++ b/src/features/Calendars/CalendarApi.ts @@ -45,7 +45,7 @@ export async function postCalendar( body: JSON.stringify({ id: calId, "dav:name": name, - "apple:color": color, + "apple:color": color.light, "caldav:description": desc, }), }); @@ -71,10 +71,8 @@ export async function addSharedCalendar( "calendarserver:source": { acl: cal.cal.acl, calendarHomeId: cal.cal.id, - color: { - light: cal.cal["apple:color"], - dark: cal.cal["X-TWAKE-Dark-theme-color"], - }, + color: cal.cal["apple:color"], + description: cal.cal["caldav:description"], href: cal.cal._links.self.href, id: cal.cal.id, diff --git a/src/features/Events/EventDisplay.tsx b/src/features/Events/EventDisplay.tsx index 9d6470d..ae1a9c8 100644 --- a/src/features/Events/EventDisplay.tsx +++ b/src/features/Events/EventDisplay.tsx @@ -48,7 +48,6 @@ import { userAttendee } from "../User/userDataTypes"; import { getEvent } from "./EventApi"; import { formatLocalDateTime } from "../../components/Event/EventFormFields"; import { CalendarEvent, RepetitionObject } from "./EventsTypes"; -import { light } from "@mui/material/styles/createPalette"; export default function EventDisplayModal({ eventId,