diff --git a/src/shared/types/Course.ts b/src/shared/types/Course.ts index 588f8da4..d6b7dbcb 100644 --- a/src/shared/types/Course.ts +++ b/src/shared/types/Course.ts @@ -2,14 +2,35 @@ import { Serialized } from 'chrome-extension-toolkit'; type CourseSchedule = {}; -export class Course { - id: number; +type Professor = { name: string; - professor: string; + firstName?: string; + initial?: string; +}; + +type InstructionMode = 'Online' | 'In Person' | 'Hybrid'; + +type Links = { + syllabi?: string; + textbook?: string; + rateMyProfessor?: string; + eCIS?: string; +}; + +export class Course { + uniqueId: number; + number: string; + name: string; + department: string; + professor: Professor; + description?: string; schedule: CourseSchedule; currentStatus: string; url: string; + links: Links; registerURL?: string; + flags: string[]; + instructionMode: InstructionMode; constructor(course: Course | Serialized) { Object.assign(this, course); diff --git a/src/views/components/CourseCatalogMain.tsx b/src/views/components/CourseCatalogMain.tsx index b6bc0362..09b61561 100644 --- a/src/views/components/CourseCatalogMain.tsx +++ b/src/views/components/CourseCatalogMain.tsx @@ -18,7 +18,7 @@ export default function CourseCatalogMain({ support }: Props) { const [rows, setRows] = React.useState([]); const [selectedCourse, setSelectedCourse] = React.useState(null); - const isInfiniteScrollLoading = useInfiniteScroll(async () => { + const isScrolling = useInfiniteScroll(async () => { console.log('infinite scroll'); return false; }); @@ -38,7 +38,7 @@ export default function CourseCatalogMain({ support }: Props) { {rows.map(row => ( ))} - {isInfiniteScrollLoading &&
Scrolling...
} + {isScrolling &&
Scrolling...
} ); }