@@ -46,7 +46,7 @@ import { HydrantContext } from "../lib/hydrant";
4646import type { State } from "../lib/state" ;
4747import { ColorClasses } from "../lib/colors" ;
4848
49- import tableClasses from "./ClassTable.module.css" ;
49+ import classes from "./ClassTable.module.css" ;
5050
5151const hydrantTheme = themeQuartz . withParams ( {
5252 accentColor : "var(--chakra-colors-fg)" ,
@@ -482,7 +482,6 @@ const StarButton = ({
482482/** The table of all classes, along with searching and filtering with flags. */
483483export function ClassTable ( ) {
484484 const { state } = useContext ( HydrantContext ) ;
485- const { classes } = state ;
486485
487486 const gridRef = useRef < AgGridReact < ClassTableRow > > ( null ) ;
488487
@@ -534,7 +533,7 @@ export function ClassTable() {
534533 comparator : classSort ,
535534 initialSort,
536535 maxWidth : 93 ,
537- cellClass : tableClasses [ "underline-on-hover" ] ,
536+ cellClass : classes [ "underline-on-hover" ] ,
538537 ...sortProps ,
539538 } ,
540539 {
@@ -574,15 +573,15 @@ export function ClassTable() {
574573 // Setup rows
575574 const rowData : ClassTableRow [ ] = useMemo (
576575 ( ) =>
577- Array . from ( classes . values ( ) , ( cls ) => ( {
576+ Array . from ( state . classes . values ( ) , ( cls ) => ( {
578577 number : cls . number ,
579578 rating : cls . evals . rating . slice ( 0 , 3 ) , // remove the "/7.0" if exists
580579 hours : cls . evals . hours ,
581580 name : cls . name ,
582581 class : cls ,
583582 inCharge : cls . description . inCharge ,
584583 } ) ) ,
585- [ classes ] ,
584+ [ state . classes ] ,
586585 ) ;
587586
588587 const [ inputFilter , setInputFilter ] = useState < ClassFilter | null > ( null ) ;
@@ -614,7 +613,7 @@ export function ClassTable() {
614613 < AgGridReact < ClassTableRow >
615614 theme = { hydrantTheme }
616615 ref = { gridRef }
617- rowClass = { tableClasses . row }
616+ rowClass = { classes . row }
618617 defaultColDef = { defaultColDef }
619618 columnDefs = { columnDefs }
620619 rowData = { rowData }
0 commit comments