Skip to content

Commit

Permalink
change5ok
Browse files Browse the repository at this point in the history
  • Loading branch information
gurramkarthiknetha committed Dec 9, 2024
1 parent c965a31 commit d8f0951
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
14 changes: 6 additions & 8 deletions src/components/EventCalendar/EventCalendar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -489,6 +494,7 @@
--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;
Expand Down Expand Up @@ -553,14 +559,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;
Expand Down
11 changes: 9 additions & 2 deletions src/components/EventCalendar/EventCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,21 @@ const Calendar: React.FC<InterfaceCalendarProps> = ({
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.
*/
Expand Down

0 comments on commit d8f0951

Please sign in to comment.