diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/common/CalendarGrid/CalendarGrid.tsx index 9c91fe84..6d931dd7 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.tsx +++ b/src/views/components/common/CalendarGrid/CalendarGrid.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { DAY_MAP } from 'src/shared/types/CourseMeeting'; import styles from './CalendarGrid.module.scss'; import CalendarCell from '../CalendarGridCell/CalendarGridCell'; +import { CourseMeeting } from 'src/shared/types/CourseMeeting'; const daysOfWeek = Object.keys(DAY_MAP).filter(key => !['S', 'SU'].includes(key)); const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8); @@ -20,37 +21,44 @@ for (let i = 0; i < 13; i++) { grid.push(row); } +interface Props { + CourseMeetingBlocks: CourseMeeting[]; +} + /** * Grid of CalendarGridCell components forming the user's course schedule calendar view * @param props */ -const Calendar: React.FC = props => ( -
-
- {/* Displaying the rest of the calendar */} -
- {/*
-
- {hoursOfDay.map((hour) => ( -
-
-

{hour % 12 === 0 ? 12 : hour % 12} {hour < 12 ? 'AM' : 'PM'}

-
-
- ))} -
*/} -
- {/* Displaying day labels */} -
- {daysOfWeek.map(day => ( -
- {day} -
- ))} - {grid.map((row, rowIndex) => row)} +export function Calendar({ CourseMeetingBlocks }: React.PropsWithChildren): JSX.Element { + + return ( +
+
+ {/* Displaying the rest of the calendar */} +
+ {/*
+
+ {hoursOfDay.map((hour) => ( +
+
+

{hour % 12 === 0 ? 12 : hour % 12} {hour < 12 ? 'AM' : 'PM'}

+
+
+ ))} +
*/} +
+ {/* Displaying day labels */} +
+ {daysOfWeek.map(day => ( +
+ {day} +
+ ))} + {grid.map((row, rowIndex) => row)} +
-
+ ); ); export default Calendar; diff --git a/src/views/components/common/Chip/Chip.tsx b/src/views/components/common/Chip/Chip.tsx index 35dac4a6..90a6009c 100644 --- a/src/views/components/common/Chip/Chip.tsx +++ b/src/views/components/common/Chip/Chip.tsx @@ -1,8 +1,7 @@ import React from 'react'; import Text from '../Text/Text'; - -export const flags = ["WR", "QR", "GC", "CD", "E", "II"] +export const flags = ['WR', 'QR', 'GC', 'CD', 'E', 'II']; interface Props { label: string; @@ -12,15 +11,16 @@ interface Props { * A reusable chip component that follows the design system of the extension. * @returns */ -export function Chip({ - label -}: React.PropsWithChildren): JSX.Element { +export function Chip({ label }: React.PropsWithChildren): JSX.Element { return ( - + {label} );