From e9f95ad3d8aee98339781183f4334e5ff7a7f206 Mon Sep 17 00:00:00 2001 From: Derek Chen Date: Fri, 2 Feb 2024 20:41:14 -0600 Subject: [PATCH] Docs and needed changes --- .../common/CalendarGrid/CalendarGrid.tsx | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/common/CalendarGrid/CalendarGrid.tsx index 08b405fd..4028296e 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.tsx +++ b/src/views/components/common/CalendarGrid/CalendarGrid.tsx @@ -2,21 +2,27 @@ import React from 'react'; import styles from './CalendarGrid.module.scss'; import CalendarCell from '../CalendarGridCell/CalendarGridCell'; + +const daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']; +const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8); + +/** + * Grid of CalendarGridCell components forming the user's course schedule calendar view + * @param props + */ const Calendar: React.FC = (props) => { - const daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']; - const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8); return ( -
-
+
+
{daysOfWeek.map((day, dayIndex) => ( -
-
-
{day}
+
+
+
{day}
{hoursOfDay.map((hour) => ( -
-
+
+
{hour}:00