Merge branch 'hackathon' of https://github.com/UT-Developers/UT-Registration-Plus into hackathon
This commit is contained in:
@@ -119,7 +119,7 @@ function CalendarGrid({ courseCells, saturdayClass }: React.PropsWithChildren<Pr
|
||||
</div>
|
||||
))}
|
||||
{grid.map((row, rowIndex) => row)}
|
||||
{courseCells ? accountForCourseConflicts(courseCells) : null}
|
||||
{courseCells ? <AccountForCourseConflicts courseCells={courseCells}/> : null}
|
||||
{/* courseCells.map((block: CalendarGridCourse) => (
|
||||
<div
|
||||
key={`${block}`}
|
||||
@@ -142,7 +142,11 @@ function CalendarGrid({ courseCells, saturdayClass }: React.PropsWithChildren<Pr
|
||||
|
||||
export default CalendarGrid;
|
||||
|
||||
function accountForCourseConflicts(courseCells: CalendarGridCourse[]): JSX.Element[] {
|
||||
interface AccountForCourseConflictsProps {
|
||||
courseCells: CalendarGridCourse[];
|
||||
}
|
||||
|
||||
function AccountForCourseConflicts({ courseCells }: AccountForCourseConflictsProps): JSX.Element[] {
|
||||
// Groups by dayIndex to identify overlaps
|
||||
const days = courseCells.reduce((acc, cell: CalendarGridCourse) => {
|
||||
const { dayIndex } = cell.calendarGridPoint;
|
||||
|
||||
Reference in New Issue
Block a user