feat: use filter() instead of pop()

This commit is contained in:
2024-02-05 23:00:42 -06:00
committed by doprz
parent d377afbf8b
commit 063349d96d

View File

@@ -3,9 +3,7 @@ import styles from './CalendarGrid.module.scss';
import CalendarCell from '../CalendarGridCell/CalendarGridCell'; import CalendarCell from '../CalendarGridCell/CalendarGridCell';
import { DAY_MAP } from 'src/shared/types/CourseMeeting'; import { DAY_MAP } from 'src/shared/types/CourseMeeting';
const daysOfWeek = Object.values(DAY_MAP); const daysOfWeek = Object.values(DAY_MAP).filter(d => d != "Saturday" && d != "Sunday")
daysOfWeek.pop();
daysOfWeek.pop();
const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8); const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8);
const grid = Array.from({ length: 5 }, () => const grid = Array.from({ length: 5 }, () =>
Array.from({ length: 13 }, (_, columnIndex) => ( Array.from({ length: 13 }, (_, columnIndex) => (