Skip to content

Commit

Permalink
new change
Browse files Browse the repository at this point in the history
  • Loading branch information
gurramkarthiknetha committed Dec 10, 2024
1 parent fceed25 commit 842855c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
26 changes: 9 additions & 17 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 @@ -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;
Expand Down Expand Up @@ -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;
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 842855c

Please sign in to comment.