import React from 'react'; import { DAY_MAP } from 'src/shared/types/CourseMeeting'; 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'; import calIcon from 'src/assets/icons/cal.svg'; import pngIcon from 'src/assets/icons/png.svg'; 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'}