From 063349d96d0ad008fa0dc1f0a8c7a27cf3f108ce Mon Sep 17 00:00:00 2001 From: Derek Chen Date: Mon, 5 Feb 2024 23:00:42 -0600 Subject: [PATCH] feat: use filter() instead of pop() --- src/views/components/common/CalendarGrid/CalendarGrid.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/common/CalendarGrid/CalendarGrid.tsx index 0385b258..eee0b565 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.tsx +++ b/src/views/components/common/CalendarGrid/CalendarGrid.tsx @@ -3,9 +3,7 @@ import styles from './CalendarGrid.module.scss'; import CalendarCell from '../CalendarGridCell/CalendarGridCell'; import { DAY_MAP } from 'src/shared/types/CourseMeeting'; -const daysOfWeek = Object.values(DAY_MAP); -daysOfWeek.pop(); -daysOfWeek.pop(); +const daysOfWeek = Object.values(DAY_MAP).filter(d => d != "Saturday" && d != "Sunday") const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8); const grid = Array.from({ length: 5 }, () => Array.from({ length: 13 }, (_, columnIndex) => (