From 842855c9be6ee47347ec3b071723c250d04d4d0a Mon Sep 17 00:00:00 2001 From: gurramkarthiknetha Date: Tue, 10 Dec 2024 18:14:59 +0530 Subject: [PATCH] new change --- .../EventCalendar/EventCalendar.module.css | 26 +++++++------------ .../EventCalendar/EventCalendar.tsx | 11 ++++++-- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/components/EventCalendar/EventCalendar.module.css b/src/components/EventCalendar/EventCalendar.module.css index 1dfc2f73bc..9a529e98cd 100644 --- a/src/components/EventCalendar/EventCalendar.module.css +++ b/src/components/EventCalendar/EventCalendar.module.css @@ -437,6 +437,11 @@ width: 40px; background: rgba(146, 200, 141, 0.5); border-radius: 10px; + background-color: rgba(139, 195, 74, 1); + border-radius: 5px; + width: 20px; + height: 12px; + display: inline-block; } .baseIndicator { @@ -472,24 +477,19 @@ font-size: 14px; color: #555555; } -.eventsLegend { - display: flex; - align-items: center; - gap: 8px; -} :root { /* Holiday colors */ --color-holiday-indicator: rgba(0, 0, 0, 0.15); --color-holiday-date: rgba(255, 152, 0, 1); --mobile-breakpoint: 700px; - --small-mobile-breakpoint: 480px; /* Adjust value based on your needs */ - /* Text colors */ - --color-text-primary: rgba(51, 51, 51, 1); - --color-text-secondary: rgba(85, 85, 85, 1); + --small-mobile-breakpoint: 480px; + --text-color-primary: rgba(51, 51, 51, 1); + --text-color-secondary: rgba(85, 85, 85, 1); /* Card styles */ --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); --holiday-card-bg: #f6f2e5; --holiday-date-color: #ea7b56; + --indicator-spacing: 8px; } .organizationIndicator { composes: baseIndicator; @@ -554,14 +554,6 @@ background-color: var(--grey-bg-color); } -.userEvents__color { - background-color: rgba(139, 195, 74, 1); - border-radius: 5px; - width: 20px; - height: 12px; - display: inline-block; -} - .holidays_card, .events_card { flex: 1; diff --git a/src/components/EventCalendar/EventCalendar.tsx b/src/components/EventCalendar/EventCalendar.tsx index 1f4ef9895e..798acb3426 100644 --- a/src/components/EventCalendar/EventCalendar.tsx +++ b/src/components/EventCalendar/EventCalendar.tsx @@ -140,14 +140,21 @@ const Calendar: React.FC = ({ holidays?.filter((holiday) => { try { return dayjs(holiday.date, 'MM-DD').month() === currentMonth; - // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (e) { - console.error(`Invalid date format for holiday: ${holiday.name}`); + if (e instanceof Error) { + console.error( + `Invalid date format for holiday "${holiday.name}":`, + e.message, + ); + } else { + console.error(`Unknown error for holiday "${holiday.name}"`); + } return false; } }), [holidays, currentMonth], ); + /** * Moves the calendar view to the next month. */