From 56306ab9440baf5ca1158f95d788de7ba42d73d8 Mon Sep 17 00:00:00 2001 From: doprz <52579214+doprz@users.noreply.github.com> Date: Wed, 6 Mar 2024 13:41:21 -0600 Subject: [PATCH] fix: revert CalendarGrid and CalendarGridCell back to SCSS from Tailwind --- .../CalendarGrid/CalendarGrid.module.scss | 7 +- .../common/CalendarGrid/CalendarGrid.tsx | 66 +++++++++---------- .../CalendarGridCell/CalendarGridCell.tsx | 11 ++-- 3 files changed, 41 insertions(+), 43 deletions(-) diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss index c40bafc2..7a6d8762 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss +++ b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss @@ -29,15 +29,16 @@ .day { gap: 5px; + color: #bf5700; text-align: center; font-size: 14.22px; font-style: normal; font-weight: 500; line-height: normal; margin-top: 20px; - border-right: 1px solid #DADCE0; - border-bottom: 1px solid #DADCE0; - border-left: 1px solid #DADCE0; + border-right: 1px solid #dadce0; + border-bottom: 1px solid #dadce0; + border-left: 1px solid #dadce0; } .timeAndGrid { diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/common/CalendarGrid/CalendarGrid.tsx index 817ab0a6..9c91fe84 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.tsx +++ b/src/views/components/common/CalendarGrid/CalendarGrid.tsx @@ -1,58 +1,56 @@ import React from 'react'; -import CalendarCell from '../CalendarGridCell/CalendarGridCell'; import { DAY_MAP } from 'src/shared/types/CourseMeeting'; +import styles from './CalendarGrid.module.scss'; +import CalendarCell from '../CalendarGridCell/CalendarGridCell'; const daysOfWeek = Object.keys(DAY_MAP).filter(key => !['S', 'SU'].includes(key)); const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8); const grid = []; for (let i = 0; i < 13; i++) { - const row = []; - let hour = hoursOfDay[i]; - row.push( -
{(hour % 12 === 0 ? 12 : hour % 12) + (hour < 12 ? ' AM' : ' PM')}
-{(hour % 12 === 0 ? 12 : hour % 12) + (hour < 12 ? ' AM' : ' PM')}
+{hour % 12 === 0 ? 12 : hour % 12} {hour < 12 ? 'AM' : 'PM'}