diff --git a/src/views/components/CourseCatalogMain.tsx b/src/views/components/CourseCatalogMain.tsx index 5a8a1dc0..5e0b12de 100644 --- a/src/views/components/CourseCatalogMain.tsx +++ b/src/views/components/CourseCatalogMain.tsx @@ -5,7 +5,7 @@ import CourseCatalogInjectedPopup from '@views/components/injected/CourseCatalog import RecruitmentBanner from '@views/components/injected/RecruitmentBanner/RecruitmentBanner'; import TableHead from '@views/components/injected/TableHead'; import TableRow from '@views/components/injected/TableRow/TableRow'; -import TableSubheading from '@views/components/injected/TableSubheading/TableSubheading'; +// import TableSubheading from '@views/components/injected/TableSubheading/TableSubheading'; import { useKeyPress } from '@views/hooks/useKeyPress'; import useSchedules from '@views/hooks/useSchedules'; import { CourseCatalogScraper } from '@views/lib/CourseCatalogScraper'; @@ -63,21 +63,18 @@ export default function CourseCatalogMain({ support }: Props): JSX.Element { Plus - {rows.map((row, i) => { - if (!row.course) { - // TODO: handle the course section headers - return ; - } - return ( - - ); - })} + {rows.map( + row => + row.course && ( + + ) + )} {selectedCourse && ( *:not(td:last-child) { color: colors.$turtle_pond !important; font-weight: bold !important; } } -.isConflict { - * { - color: colors.$speedway_brick !important; - font-weight: normal !important; - text-decoration: line-through !important; +// for the edge case where they have conflicting classes in their schedule +.isConflict:not(.inActiveSchedule) { + > *:not(td:last-child) { + color: colors.$speedway_brick; + font-weight: normal; + text-decoration: line-through; } } diff --git a/src/views/components/injected/TableRow/TableRow.tsx b/src/views/components/injected/TableRow/TableRow.tsx index b8e5d6be..b2a1ee2c 100644 --- a/src/views/components/injected/TableRow/TableRow.tsx +++ b/src/views/components/injected/TableRow/TableRow.tsx @@ -1,11 +1,10 @@ import type { Course, ScrapedRow } from '@shared/types/Course'; import type { UserSchedule } from '@shared/types/UserSchedule'; -import { Button } from '@views/components/common/Button/Button'; import ConflictsWithWarning from '@views/components/common/ConflictsWithWarning/ConflictsWithWarning'; import React, { useEffect, useState } from 'react'; import ReactDOM from 'react-dom'; -import AddIcon from '~icons/material-symbols/add-circle'; +import RowIcon from '~icons/material-symbols/bar-chart-rounded'; import styles from './TableRow.module.scss'; @@ -30,8 +29,9 @@ export default function TableRow({ row, isSelected, activeSchedule, onClick }: P useEffect(() => { element.classList.add(styles.row); + element.classList.add('group'); const portalContainer = document.createElement('td'); - portalContainer.style.textAlign = 'right'; + // portalContainer.style.textAlign = 'right'; const lastTableCell = element.querySelector('td:last-child'); lastTableCell!.after(portalContainer); setContainer(portalContainer); @@ -85,16 +85,20 @@ export default function TableRow({ row, isSelected, activeSchedule, onClick }: P } return ReactDOM.createPortal( - <> - + {conflicts.length > 0 && ( + + )} + , container ); }