From 851947db0b597d7d3901667de8669b8e5c8c917e Mon Sep 17 00:00:00 2001 From: knownotunknown <78577376+knownotunknown@users.noreply.github.com> Date: Sat, 17 Feb 2024 15:03:18 -0600 Subject: [PATCH] Update --- .../components/common/CalendarGrid/CalendarGrid.tsx | 11 ++++++----- src/views/hooks/useFlattenedCourseSchedule.ts | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/common/CalendarGrid/CalendarGrid.tsx index 0bd85c10..0e478921 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.tsx +++ b/src/views/components/common/CalendarGrid/CalendarGrid.tsx @@ -1,9 +1,10 @@ import React from 'react'; import { DAY_MAP } from 'src/shared/types/CourseMeeting'; -import styles from './CalendarGrid.module.scss'; import CalendarCell from '../CalendarGridCell/CalendarGridCell'; +import { CalendarGridCourse } from 'src/views/hooks/useFlattenedCourseSchedule'; import CalendarCourseCell from '../CalendarCourseCell/CalendarCourseCell'; import { Chip } from '../Chip/Chip'; +import styles from './CalendarGrid.module.scss'; const daysOfWeek = Object.keys(DAY_MAP).filter(key => !['S', 'SU'].includes(key)); const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8); @@ -23,7 +24,7 @@ for (let i = 0; i < 13; i++) { } interface Props { - courseCells: any[]; + courseCells: CalendarGridCourse[]; saturdayClass: boolean; } @@ -58,7 +59,7 @@ function CalendarGrid({ courseCells, saturdayClass }: React.PropsWithChildren row)} - {/* courseCells.map((Block: typeof CalendarCourseCell) => ( + {courseCells.map((Block: typeof CalendarCourseCell) => (
- +
- )) */} + ))} ); } diff --git a/src/views/hooks/useFlattenedCourseSchedule.ts b/src/views/hooks/useFlattenedCourseSchedule.ts index 0f324364..60f52cdc 100644 --- a/src/views/hooks/useFlattenedCourseSchedule.ts +++ b/src/views/hooks/useFlattenedCourseSchedule.ts @@ -15,7 +15,7 @@ interface CalendarGridPoint { endIndex: number; } -interface SomeObject { +export interface CalendarGridCourse { calendarGridPoint?: CalendarGridPoint; componentProps: CalendarCourseCellProps; }