From a053318bc0e36e7f2992ecb3d0be1312d9d0432c Mon Sep 17 00:00:00 2001 From: lenhanphung Date: Wed, 17 Sep 2025 18:40:25 +0700 Subject: [PATCH] style: fix prettier formatting issues - Fix formatting in Calendar.css, Calendar.tsx - Fix formatting in Menubar.tsx - Fix formatting in eventUtils.ts --- src/components/Calendar/Calendar.css | 23 +++++++++++------------ src/components/Calendar/Calendar.tsx | 6 +++++- src/components/Menubar/Menubar.tsx | 10 ++++++---- src/features/Events/eventUtils.ts | 2 +- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/components/Calendar/Calendar.css b/src/components/Calendar/Calendar.css index 2871228..87e7712 100644 --- a/src/components/Calendar/Calendar.css +++ b/src/components/Calendar/Calendar.css @@ -25,7 +25,7 @@ margin-left: 25%; } .sidebar { - border-right: 2px solid #F3F4F6; + border-right: 2px solid #f3f4f6; width: 20vw; padding: 16px 25px; } @@ -67,7 +67,6 @@ overflow: hidden; /* Important: let FullCalendar handle internal scroll */ } - /* Base container */ .fc-daygrid-day-top { display: flex; @@ -77,7 +76,6 @@ font-family: "Inter", sans-serif; } - /* sidebar*/ .sidebar-calendar { width: 280px; @@ -169,12 +167,13 @@ .fc-header-toolbar.fc-toolbar.fc-toolbar-ltr { /* display: none; */ } -.fc-theme-standard td, .fc-theme-standard th { - border: 1px solid #B8C1CC; +.fc-theme-standard td, +.fc-theme-standard th { + border: 1px solid #b8c1cc; border-left: 0; } a.fc-timegrid-axis-cushion { - color: #243B55; + color: #243b55; text-align: center; font-family: Roboto; font-size: 12.507px; @@ -184,7 +183,7 @@ a.fc-timegrid-axis-cushion { letter-spacing: 0.391px; } .fc-daygrid-day-top small { - color: #8C9CAF; + color: #8c9caf; font-size: 14px; font-style: normal; font-weight: 500; @@ -220,7 +219,7 @@ span.fc-daygrid-day-number.current-date { color: #fff; } span.fc-daygrid-day-number.current-date:after { - background-color: #F67E35; + background-color: #f67e35; } td.fc-timegrid-slot.fc-timegrid-slot-label.fc-scrollgrid-shrink, td.fc-timegrid-slot.fc-timegrid-slot-label.fc-timegrid-slot-minor { @@ -228,7 +227,7 @@ td.fc-timegrid-slot.fc-timegrid-slot-label.fc-timegrid-slot-minor { } th.fc-timegrid-axis.fc-scrollgrid-shrink { border: 0; - border-right: 1px solid #B8C1CC; + border-right: 1px solid #b8c1cc; } .fc .fc-timegrid-axis-cushion { min-width: 70px; @@ -241,7 +240,7 @@ th.fc-timegrid-axis.fc-scrollgrid-shrink { height: 0; } .fc-timegrid-slot-label-cushion { - color: #AEA9B1; + color: #aea9b1; font-family: Roboto; font-size: 14px; font-style: normal; @@ -265,10 +264,10 @@ th.fc-col-header-cell.fc-day { .fc .fc-timegrid-slot-label .fc-timegrid-slot-label-frame::after { content: ""; z-index: -1; - background-color: #B8C1CC; + background-color: #b8c1cc; width: 10px; height: 1px; position: absolute; top: 9.5px; right: -15px; -} \ No newline at end of file +} diff --git a/src/components/Calendar/Calendar.tsx b/src/components/Calendar/Calendar.tsx index b4a8bcc..58ceea2 100644 --- a/src/components/Calendar/Calendar.tsx +++ b/src/components/Calendar/Calendar.tsx @@ -84,7 +84,11 @@ export default function CalendarApp() { // Auto-select personal calendars when first loaded useEffect(() => { - if (Object.keys(calendars).length > 0 && userId && selectedCalendars.length === 0) { + if ( + Object.keys(calendars).length > 0 && + userId && + selectedCalendars.length === 0 + ) { const personalCalendarIds = Object.keys(calendars).filter( (id) => id.split("/")[0] === userId ); diff --git a/src/components/Menubar/Menubar.tsx b/src/components/Menubar/Menubar.tsx index f19afe6..3850f71 100644 --- a/src/components/Menubar/Menubar.tsx +++ b/src/components/Menubar/Menubar.tsx @@ -48,16 +48,18 @@ export function Menubar() { {user?.name && user?.family_name ? `${user.name[0]}${user.family_name[0]}` - : user?.email?.[0] ?? ''} + : (user?.email?.[0] ?? "")} diff --git a/src/features/Events/eventUtils.ts b/src/features/Events/eventUtils.ts index 503b9b7..e0eb0fc 100644 --- a/src/features/Events/eventUtils.ts +++ b/src/features/Events/eventUtils.ts @@ -242,7 +242,7 @@ export function calendarEventToJCal( }); return ["vcalendar", [], [vevent, vtimezone.component.jCal]]; } - + const vtimezone = new ICAL.Timezone({ component: timezoneData.ics, tzid: event.timezone,