@@ -5,17 +5,13 @@ import {
55} from "@core/types/calendar.types" ;
66import { CalendarProvider } from "@core/types/event.types" ;
77import { type gSchema$CalendarListEntry } from "@core/types/gcal" ;
8- import { generateCalendarColorScheme } from "@core/util/color.utils" ;
98import dayjs from "@core/util/date/dayjs" ;
109
1110export class MapCalendar {
1211 static gcalToCompass (
1312 user : ObjectId | string ,
1413 googleCalendar : gSchema$CalendarListEntry ,
1514 ) {
16- // generate fallback colors
17- const { backgroundColor, color } = generateCalendarColorScheme ( ) ;
18-
1915 const metadata = GoogleCalendarMetadataSchema . parse ( {
2016 ...googleCalendar ,
2117 provider : CalendarProvider . GOOGLE ,
@@ -24,8 +20,8 @@ export class MapCalendar {
2420 return CompassCalendarSchema . parse ( {
2521 _id : new ObjectId ( ) ,
2622 user,
27- backgroundColor : googleCalendar . backgroundColor ?? backgroundColor ,
28- color : googleCalendar . foregroundColor ?? color ,
23+ backgroundColor : googleCalendar . backgroundColor ?? "#9e9e9e" ,
24+ color : googleCalendar . foregroundColor ?? "#000000" ,
2925 selected : googleCalendar . selected ?? true ,
3026 primary : googleCalendar . primary ?? false ,
3127 timezone : googleCalendar . timeZone ?? dayjs . tz . guess ( ) ,
0 commit comments