moved files around
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
|
|||||||
import { Course, CourseRow } from 'src/shared/types/Course';
|
import { Course, CourseRow } from 'src/shared/types/Course';
|
||||||
import useInfiniteScroll from '../hooks/useInfiniteScroll';
|
import useInfiniteScroll from '../hooks/useInfiniteScroll';
|
||||||
import { useKeyPress } from '../hooks/useKeyPress';
|
import { useKeyPress } from '../hooks/useKeyPress';
|
||||||
import { CourseScraper } from '../lib/courseCatalog/CourseScraper';
|
import { CourseCatalogScraper } from '../lib/CourseCatalogScraper';
|
||||||
import { populateSearchInputs } from '../lib/courseCatalog/populateSearchInputs';
|
import { populateSearchInputs } from '../lib/courseCatalog/populateSearchInputs';
|
||||||
import { SiteSupport } from '../lib/getSiteSupport';
|
import { SiteSupport } from '../lib/getSiteSupport';
|
||||||
import ExtensionRoot from './common/ExtensionRoot/ExtensionRoot';
|
import ExtensionRoot from './common/ExtensionRoot/ExtensionRoot';
|
||||||
@@ -31,7 +31,7 @@ export default function CourseCatalogMain({ support }: Props) {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const scraper = new CourseScraper(support);
|
const scraper = new CourseCatalogScraper(support);
|
||||||
const rows = scraper.scrape(document.querySelectorAll<HTMLTableRowElement>('table tbody tr'));
|
const rows = scraper.scrape(document.querySelectorAll<HTMLTableRowElement>('table tbody tr'));
|
||||||
console.log('useEffect -> rows:', rows);
|
console.log('useEffect -> rows:', rows);
|
||||||
setRows(rows);
|
setRows(rows);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ enum DetailsSelector {
|
|||||||
/**
|
/**
|
||||||
* A class that allows use to scrape information from UT's course catalog to create our internal representation of a course
|
* A class that allows use to scrape information from UT's course catalog to create our internal representation of a course
|
||||||
*/
|
*/
|
||||||
export class CourseScraper {
|
export class CourseCatalogScraper {
|
||||||
support: SiteSupport;
|
support: SiteSupport;
|
||||||
|
|
||||||
constructor(support: SiteSupport) {
|
constructor(support: SiteSupport) {
|
||||||
Reference in New Issue
Block a user