fix: comment/fix build errors
This commit is contained in:
@@ -17,7 +17,7 @@ import TableRow from './injected/TableRow/TableRow';
|
|||||||
import TableSubheading from './injected/TableSubheading/TableSubheading';
|
import TableSubheading from './injected/TableSubheading/TableSubheading';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
support: SiteSupport.COURSE_CATALOG_DETAILS | SiteSupport.COURSE_CATALOG_LIST;
|
support: any; // SiteSupport.COURSE_CATALOG_DETAILS | SiteSupport.COURSE_CATALOG_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export default function PopupMain() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Divider color='#E2E8F0' type='solid' style={{ margin: '1rem 0' }} />
|
{/* <Divider color='#E2E8F0' type='solid' style={{ margin: '1rem 0' }} /> */}
|
||||||
<div
|
<div
|
||||||
className='mb-4 rounded-lg bg-white p-2 text-left shadow-inner'
|
className='mb-4 rounded-lg bg-white p-2 text-left shadow-inner'
|
||||||
style={{ backgroundColor: 'white', border: '1px solid #FBD38D', borderRadius: '0.5rem' }}
|
style={{ backgroundColor: 'white', border: '1px solid #FBD38D', borderRadius: '0.5rem' }}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import type { StatusType } from '@shared/types/Course';
|
||||||
import { Status } from '@shared/types/Course';
|
import { Status } from '@shared/types/Course';
|
||||||
import Text from '@views/components/common/Text/Text';
|
import Text from '@views/components/common/Text/Text';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
@@ -15,7 +16,7 @@ import CancelledIcon from '~icons/material-symbols/warning';
|
|||||||
export interface CalendarCourseCellProps {
|
export interface CalendarCourseCellProps {
|
||||||
courseDeptAndInstr: string;
|
courseDeptAndInstr: string;
|
||||||
timeAndLocation?: string;
|
timeAndLocation?: string;
|
||||||
status: Status;
|
status: StatusType;
|
||||||
colors: CourseColors;
|
colors: CourseColors;
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const CalendarHeader = () => (
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Divider type='solid' />
|
{/* <Divider type='solid' /> */}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Status } from '@shared/types/Course';
|
import type { StatusType } from '@shared/types/Course';
|
||||||
import { StatusIcon } from '@shared/util/icons';
|
import { StatusIcon } from '@shared/util/icons';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
@@ -11,7 +11,7 @@ type SizeType = 'small' | 'mini';
|
|||||||
* Props for CourseStatus
|
* Props for CourseStatus
|
||||||
*/
|
*/
|
||||||
export interface CourseStatusProps {
|
export interface CourseStatusProps {
|
||||||
status: Status;
|
status: StatusType;
|
||||||
size: SizeType;
|
size: SizeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { DragDropContext, Draggable, Droppable } from '@hello-pangea/dnd';
|
import { DragDropContext, Draggable, Droppable } from '@hello-pangea/dnd';
|
||||||
import type { ReactElement } from 'react';
|
import type { ReactElement } from 'react';
|
||||||
import React, { useCallback, useState } from 'react';
|
import React, { useCallback, useState } from 'react';
|
||||||
import { areEqual } from 'react-window';
|
// import { areEqual } from 'react-window';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ctrl + f dragHandleProps on PopupCourseBlock.tsx for example implementation of drag handle (two lines of code)
|
* Ctrl + f dragHandleProps on PopupCourseBlock.tsx for example implementation of drag handle (two lines of code)
|
||||||
@@ -75,7 +75,7 @@ const Row: React.FC<RowProps> = React.memo(({ data: { items, gap }, index, style
|
|||||||
{provided => <Item provided={provided} item={item} style={adjustedStyle} gap={gap} />}
|
{provided => <Item provided={provided} item={item} style={adjustedStyle} gap={gap} />}
|
||||||
</Draggable>
|
</Draggable>
|
||||||
);
|
);
|
||||||
}, areEqual);
|
}); // areEqual);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `List` is a functional component that displays a course meeting.
|
* `List` is a functional component that displays a course meeting.
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import type { ScrapedRow } from '@shared/types/Course';
|
|||||||
import useInfiniteScroll from '@views/hooks/useInfiniteScroll';
|
import useInfiniteScroll from '@views/hooks/useInfiniteScroll';
|
||||||
import { CourseCatalogScraper } from '@views/lib/CourseCatalogScraper';
|
import { CourseCatalogScraper } from '@views/lib/CourseCatalogScraper';
|
||||||
import { SiteSupport } from '@views/lib/getSiteSupport';
|
import { SiteSupport } from '@views/lib/getSiteSupport';
|
||||||
|
import type { AutoLoadStatusType } from '@views/lib/loadNextCourseCatalogPage';
|
||||||
import {
|
import {
|
||||||
AutoLoadStatus,
|
AutoLoadStatus,
|
||||||
loadNextCourseCatalogPage,
|
loadNextCourseCatalogPage,
|
||||||
@@ -22,7 +23,7 @@ type Props = {
|
|||||||
*/
|
*/
|
||||||
export default function AutoLoad({ addRows }: Props) {
|
export default function AutoLoad({ addRows }: Props) {
|
||||||
const [container, setContainer] = useState<HTMLDivElement | null>(null);
|
const [container, setContainer] = useState<HTMLDivElement | null>(null);
|
||||||
const [status, setStatus] = useState<AutoLoadStatus>(AutoLoadStatus.IDLE);
|
const [status, setStatus] = useState<AutoLoadStatusType>(AutoLoadStatus.IDLE);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const portalContainer = document.createElement('div');
|
const portalContainer = document.createElement('div');
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ const HeadingAndActions: React.FC<HeadingAndActionProps> = ({ course, onClose, a
|
|||||||
</div>
|
</div>
|
||||||
<div className='my-3 flex flex-wrap items-center gap-[15px]'>
|
<div className='my-3 flex flex-wrap items-center gap-[15px]'>
|
||||||
<Button variant='filled' color='ut-burntorange' icon={CalendarMonth} onClick={handleOpenCalendar} />
|
<Button variant='filled' color='ut-burntorange' icon={CalendarMonth} onClick={handleOpenCalendar} />
|
||||||
<Divider type='solid' color='ut-offwhite' className='h-7' />
|
{/* <Divider type='solid' color='ut-offwhite' className='h-7' /> */}
|
||||||
<Button variant='outline' color='ut-blue' icon={Reviews} onClick={handleOpenRateMyProf}>
|
<Button variant='outline' color='ut-blue' icon={Reviews} onClick={handleOpenRateMyProf}>
|
||||||
RateMyProf
|
RateMyProf
|
||||||
</Button>
|
</Button>
|
||||||
@@ -150,7 +150,7 @@ const HeadingAndActions: React.FC<HeadingAndActionProps> = ({ course, onClose, a
|
|||||||
{!courseAdded ? 'Add Course' : 'Remove Course'}
|
{!courseAdded ? 'Add Course' : 'Remove Course'}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<Divider />
|
{/* <Divider /> */}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { InstructionMode, ScrapedRow, Semester } from '@shared/types/Course';
|
import type { InstructionMode, ScrapedRow, Semester, StatusType } from '@shared/types/Course';
|
||||||
import { Course, Status } from '@shared/types/Course';
|
import { Course, Status } from '@shared/types/Course';
|
||||||
import { CourseSchedule } from '@shared/types/CourseSchedule';
|
import { CourseSchedule } from '@shared/types/CourseSchedule';
|
||||||
import Instructor from '@shared/types/Instructor';
|
import Instructor from '@shared/types/Instructor';
|
||||||
@@ -278,7 +278,7 @@ export class CourseCatalogScraper {
|
|||||||
* @param row the row of the course catalog table
|
* @param row the row of the course catalog table
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getStatus(row: HTMLTableRowElement): [status: Status, isReserved: boolean] {
|
getStatus(row: HTMLTableRowElement): [status: StatusType, isReserved: boolean] {
|
||||||
const div = row.querySelector(TableDataSelector.STATUS);
|
const div = row.querySelector(TableDataSelector.STATUS);
|
||||||
if (!div) {
|
if (!div) {
|
||||||
throw new Error('Status not found');
|
throw new Error('Status not found');
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const messenger = createMessenger<MyMessages>('background');
|
|||||||
export async function openTabFromContentScript(url: string) {
|
export async function openTabFromContentScript(url: string) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
messenger
|
messenger
|
||||||
.openNewTab({ url })
|
.openNewTab(/* { url } */)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log('New tab opened with URL:', url);
|
console.log('New tab opened with URL:', url);
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user