feat: build without errors
This commit is contained in:
@@ -28,7 +28,7 @@ export default function Link(props: PropsWithChildren<Props>) {
|
|||||||
<Text
|
<Text
|
||||||
color='bluebonnet'
|
color='bluebonnet'
|
||||||
{...passedProps}
|
{...passedProps}
|
||||||
span
|
as='span'
|
||||||
className={clsx(
|
className={clsx(
|
||||||
styles.link,
|
styles.link,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export default function CourseDescription({ course }: Props) {
|
|||||||
return (
|
return (
|
||||||
<Card className={styles.container}>
|
<Card className={styles.container}>
|
||||||
{status === LoadStatus.ERROR && (
|
{status === LoadStatus.ERROR && (
|
||||||
<Text color='speedway_brick' size='medium' weight='bold' align='center'>
|
<Text color='speedway_brick' /* size='medium' weight='bold' align='center' */>
|
||||||
Please refresh the page and log back in using your UT EID and password
|
Please refresh the page and log back in using your UT EID and password
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
@@ -72,7 +72,7 @@ function DescriptionLine({ line }: LineProps) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Text className={className} size='medium'>
|
<Text className={className} /* size='medium' */>
|
||||||
{line}
|
{line}
|
||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export default function CourseButtons({ course, activeSchedule }: Props) {
|
|||||||
className={styles.button}
|
className={styles.button}
|
||||||
title='Search for this professor on RateMyProfessor'
|
title='Search for this professor on RateMyProfessor'
|
||||||
>
|
>
|
||||||
<Text size='medium' weight='regular' color='white'>
|
<Text /* size='medium' weight='regular' */color='white'>
|
||||||
RateMyProf
|
RateMyProf
|
||||||
</Text>
|
</Text>
|
||||||
<Icon className={styles.icon} color='white' name='school' size='medium' />
|
<Icon className={styles.icon} color='white' name='school' size='medium' />
|
||||||
@@ -98,7 +98,7 @@ export default function CourseButtons({ course, activeSchedule }: Props) {
|
|||||||
className={styles.button}
|
className={styles.button}
|
||||||
title='Search for syllabi for this course'
|
title='Search for syllabi for this course'
|
||||||
>
|
>
|
||||||
<Text size='medium' weight='regular' color='white'>
|
<Text /* size='medium' weight='regular' */ color='white'>
|
||||||
Syllabi
|
Syllabi
|
||||||
</Text>
|
</Text>
|
||||||
<Icon className={styles.icon} color='white' name='grading' size='medium' />
|
<Icon className={styles.icon} color='white' name='grading' size='medium' />
|
||||||
@@ -109,7 +109,7 @@ export default function CourseButtons({ course, activeSchedule }: Props) {
|
|||||||
className={styles.button}
|
className={styles.button}
|
||||||
title='Search for textbooks for this course'
|
title='Search for textbooks for this course'
|
||||||
>
|
>
|
||||||
<Text size='medium' weight='regular' color='white'>
|
<Text /* size='medium' weight='regular' color='white' */>
|
||||||
Textbook
|
Textbook
|
||||||
</Text>
|
</Text>
|
||||||
<Icon className={styles.icon} color='white' name='collections_bookmark' size='medium' />
|
<Icon className={styles.icon} color='white' name='collections_bookmark' size='medium' />
|
||||||
@@ -121,7 +121,8 @@ export default function CourseButtons({ course, activeSchedule }: Props) {
|
|||||||
type={isCourseSaved ? 'danger' : 'success'}
|
type={isCourseSaved ? 'danger' : 'success'}
|
||||||
className={styles.button}
|
className={styles.button}
|
||||||
>
|
>
|
||||||
<Text size='medium' weight='regular' color='white'>
|
|
||||||
|
<Text /* size='medium' weight='regular' color='white' */ >
|
||||||
{isCourseSaved ? 'Remove' : 'Add'}
|
{isCourseSaved ? 'Remove' : 'Add'}
|
||||||
</Text>
|
</Text>
|
||||||
<Icon className={styles.icon} color='white' name={isCourseSaved ? 'remove' : 'add'} size='medium' />
|
<Icon className={styles.icon} color='white' name={isCourseSaved ? 'remove' : 'add'} size='medium' />
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import Card from '@views/components/common/Card/Card';
|
|||||||
import Icon from '@views/components/common/Icon/Icon';
|
import Icon from '@views/components/common/Icon/Icon';
|
||||||
import Link from '@views/components/common/Link/Link';
|
import Link from '@views/components/common/Link/Link';
|
||||||
import Text from '@views/components/common/Text/Text';
|
import Text from '@views/components/common/Text/Text';
|
||||||
import CourseButtons from './CourseButtons/CourseButtons';
|
// import CourseButtons from './CourseButtons/CourseButtons';
|
||||||
import styles from './CourseHeader.module.scss';
|
import styles from './CourseHeader.module.scss';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -26,23 +26,23 @@ export default function CourseHeader({ course, activeSchedule, onClose }: Props)
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className={styles.header}>
|
<Card className={styles.header}>
|
||||||
<Icon className={styles.close} size='large' name='close' onClick={onClose} />
|
<Icon className={styles.close} /* size='large' */ name='close' onClick={onClose} />
|
||||||
<div className={styles.title}>
|
<div className={styles.title}>
|
||||||
<Text className={styles.courseName} size='large' weight='bold' color='black'>
|
<Text className={styles.courseName} /* size='large' weight='bold' color='black' */>
|
||||||
{course.courseName} ({course.department} {course.number})
|
{course.courseName} ({course.department} {course.number})
|
||||||
</Text>
|
</Text>
|
||||||
<Link
|
<Link
|
||||||
url={course.url}
|
url={course.url}
|
||||||
className={styles.uniqueId}
|
className={styles.uniqueId}
|
||||||
size='medium'
|
/* size='medium'
|
||||||
weight='semi_bold'
|
weight='semi_bold' */
|
||||||
color='burnt_orange'
|
color='burnt_orange'
|
||||||
title='View course details on UT Course Schedule'
|
title='View course details on UT Course Schedule'
|
||||||
>
|
>
|
||||||
#{course.uniqueId}
|
#{course.uniqueId}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<Text size='medium' className={styles.instructors}>
|
<Text /* size='medium' className={styles.instructors} */>
|
||||||
{`with ${!course.instructors.length ? 'TBA' : ''}`}
|
{`with ${!course.instructors.length ? 'TBA' : ''}`}
|
||||||
{course.instructors.map((instructor, index) => {
|
{course.instructors.map((instructor, index) => {
|
||||||
const name = instructor.toString({
|
const name = instructor.toString({
|
||||||
@@ -58,8 +58,8 @@ export default function CourseHeader({ course, activeSchedule, onClose }: Props)
|
|||||||
{numInstructors > 1 && index === course.instructors.length - 1 ? '& ' : ''}
|
{numInstructors > 1 && index === course.instructors.length - 1 ? '& ' : ''}
|
||||||
<Link
|
<Link
|
||||||
key={name}
|
key={name}
|
||||||
size='medium'
|
/* size='medium'
|
||||||
weight='normal'
|
weight='normal' */
|
||||||
url={url}
|
url={url}
|
||||||
title="View instructor's directory page"
|
title="View instructor's directory page"
|
||||||
>
|
>
|
||||||
@@ -71,15 +71,15 @@ export default function CourseHeader({ course, activeSchedule, onClose }: Props)
|
|||||||
})}
|
})}
|
||||||
</Text>
|
</Text>
|
||||||
{course.schedule.meetings.map(meeting => (
|
{course.schedule.meetings.map(meeting => (
|
||||||
<Text size='medium' className={styles.meeting} key={meeting.startTime}>
|
<Text /* size='medium' */ className={styles.meeting} key={meeting.startTime}>
|
||||||
<Text span size='medium' weight='bold' color='black'>
|
<Text as='span' /* size='medium' weight='bold' */ color='black'>
|
||||||
{meeting.getDaysString({
|
{meeting.getDaysString({
|
||||||
format: 'long',
|
format: 'long',
|
||||||
separator: 'short',
|
separator: 'short',
|
||||||
})}
|
})}
|
||||||
</Text>
|
</Text>
|
||||||
{' at '}
|
{' at '}
|
||||||
<Text span size='medium'>
|
<Text as='span' /* size='medium' */>
|
||||||
{meeting.getTimeString({
|
{meeting.getTimeString({
|
||||||
separator: 'to',
|
separator: 'to',
|
||||||
capitalize: true,
|
capitalize: true,
|
||||||
@@ -87,8 +87,8 @@ export default function CourseHeader({ course, activeSchedule, onClose }: Props)
|
|||||||
</Text>
|
</Text>
|
||||||
{' in '}
|
{' in '}
|
||||||
<Link
|
<Link
|
||||||
size='medium'
|
/* size='medium'
|
||||||
weight='normal'
|
weight='normal' */
|
||||||
title='View building on UT Map'
|
title='View building on UT Map'
|
||||||
url={getBuildingUrl(meeting.location?.building)}
|
url={getBuildingUrl(meeting.location?.building)}
|
||||||
disabled={!meeting.location?.building}
|
disabled={!meeting.location?.building}
|
||||||
@@ -98,7 +98,7 @@ export default function CourseHeader({ course, activeSchedule, onClose }: Props)
|
|||||||
</Text>
|
</Text>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<CourseButtons course={course} activeSchedule={activeSchedule} />
|
{/* <CourseButtons course={course} activeSchedule={activeSchedule} /> */}
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,18 +203,18 @@ export default function GradeDistribution({ course }: Props) {
|
|||||||
{status === DataStatus.LOADING && <Spinner />}
|
{status === DataStatus.LOADING && <Spinner />}
|
||||||
{status === DataStatus.ERROR && (
|
{status === DataStatus.ERROR && (
|
||||||
<Card className={styles.text}>
|
<Card className={styles.text}>
|
||||||
<Text color='speedway_brick' size='medium' weight='semi_bold'>
|
<Text color='speedway_brick' /* size='medium' weight='semi_bold' */>
|
||||||
There was an error fetching the grade distribution data
|
There was an error fetching the grade distribution data
|
||||||
</Text>
|
</Text>
|
||||||
<Icon color='speedway_brick' size='large' name='sentiment_dissatisfied' />
|
<Icon color='speedway_brick' /* size='large' */ name='sentiment_dissatisfied' />
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
{status === DataStatus.NOT_FOUND && (
|
{status === DataStatus.NOT_FOUND && (
|
||||||
<Card className={styles.text}>
|
<Card className={styles.text}>
|
||||||
<Text color='charcoal' size='medium' weight='semi_bold'>
|
<Text color='charcoal' /* size='medium' weight='semi_bold' */>
|
||||||
No grade distribution data was found for this course
|
No grade distribution data was found for this course
|
||||||
</Text>
|
</Text>
|
||||||
<Icon color='charcoal' size='x_large' name='search_off' />
|
<Icon color='charcoal' /* size='x_large' */ name='search_off' />
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export default function TableRow({ row, isSelected, activeSchedule, onClick }: P
|
|||||||
element.classList.remove(styles.isConflict);
|
element.classList.remove(styles.isConflict);
|
||||||
setConflicts([]);
|
setConflicts([]);
|
||||||
};
|
};
|
||||||
}, [activeSchedule, course]);
|
}, [activeSchedule, course, element.classList]);
|
||||||
|
|
||||||
if (!container) {
|
if (!container) {
|
||||||
return null;
|
return null;
|
||||||
@@ -91,7 +91,7 @@ export default function TableRow({ row, isSelected, activeSchedule, onClick }: P
|
|||||||
<div className={styles.conflictTooltip}>
|
<div className={styles.conflictTooltip}>
|
||||||
<div className={styles.body}>
|
<div className={styles.body}>
|
||||||
{conflicts.map(c => (
|
{conflicts.map(c => (
|
||||||
<Text size='small' key={c.uniqueId}>
|
<Text /* size='small' */ key={c.uniqueId}>
|
||||||
{c.department} {c.number} ({c.uniqueId})
|
{c.department} {c.number} ({c.uniqueId})
|
||||||
</Text>
|
</Text>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user