Skip to content

Commit

Permalink
feat: build without errors
Browse files Browse the repository at this point in the history
  • Loading branch information
knownotunknown authored and doprz committed Mar 6, 2024
1 parent 58d7df4 commit babc925
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/views/components/common/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function Link(props: PropsWithChildren<Props>) {
<Text
color='bluebonnet'
{...passedProps}
span
as='span'
className={clsx(
styles.link,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function CourseDescription({ course }: Props) {
return (
<Card className={styles.container}>
{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
</Text>
)}
Expand Down Expand Up @@ -72,7 +72,7 @@ function DescriptionLine({ line }: LineProps) {
});

return (
<Text className={className} size='medium'>
<Text className={className} /* size='medium' */>
{line}
</Text>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function CourseButtons({ course, activeSchedule }: Props) {
className={styles.button}
title='Search for this professor on RateMyProfessor'
>
<Text size='medium' weight='regular' color='white'>
<Text /* size='medium' weight='regular' */color='white'>
RateMyProf
</Text>
<Icon className={styles.icon} color='white' name='school' size='medium' />
Expand All @@ -98,7 +98,7 @@ export default function CourseButtons({ course, activeSchedule }: Props) {
className={styles.button}
title='Search for syllabi for this course'
>
<Text size='medium' weight='regular' color='white'>
<Text /* size='medium' weight='regular' */ color='white'>
Syllabi
</Text>
<Icon className={styles.icon} color='white' name='grading' size='medium' />
Expand All @@ -109,7 +109,7 @@ export default function CourseButtons({ course, activeSchedule }: Props) {
className={styles.button}
title='Search for textbooks for this course'
>
<Text size='medium' weight='regular' color='white'>
<Text /* size='medium' weight='regular' color='white' */>
Textbook
</Text>
<Icon className={styles.icon} color='white' name='collections_bookmark' size='medium' />
Expand All @@ -121,7 +121,8 @@ export default function CourseButtons({ course, activeSchedule }: Props) {
type={isCourseSaved ? 'danger' : 'success'}
className={styles.button}
>
<Text size='medium' weight='regular' color='white'>

<Text /* size='medium' weight='regular' color='white' */ >
{isCourseSaved ? 'Remove' : 'Add'}
</Text>
<Icon className={styles.icon} color='white' name={isCourseSaved ? 'remove' : 'add'} size='medium' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Card from '@views/components/common/Card/Card';
import Icon from '@views/components/common/Icon/Icon';
import Link from '@views/components/common/Link/Link';
import Text from '@views/components/common/Text/Text';
import CourseButtons from './CourseButtons/CourseButtons';
// import CourseButtons from './CourseButtons/CourseButtons';
import styles from './CourseHeader.module.scss';

type Props = {
Expand All @@ -26,23 +26,23 @@ export default function CourseHeader({ course, activeSchedule, onClose }: Props)

return (
<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}>
<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})
</Text>
<Link
url={course.url}
className={styles.uniqueId}
size='medium'
weight='semi_bold'
/* size='medium'
weight='semi_bold' */
color='burnt_orange'
title='View course details on UT Course Schedule'
>
#{course.uniqueId}
</Link>
</div>
<Text size='medium' className={styles.instructors}>
<Text /* size='medium' className={styles.instructors} */>
{`with ${!course.instructors.length ? 'TBA' : ''}`}
{course.instructors.map((instructor, index) => {
const name = instructor.toString({
Expand All @@ -58,8 +58,8 @@ export default function CourseHeader({ course, activeSchedule, onClose }: Props)
{numInstructors > 1 && index === course.instructors.length - 1 ? '& ' : ''}
<Link
key={name}
size='medium'
weight='normal'
/* size='medium'
weight='normal' */
url={url}
title="View instructor's directory page"
>
Expand All @@ -71,24 +71,24 @@ export default function CourseHeader({ course, activeSchedule, onClose }: Props)
})}
</Text>
{course.schedule.meetings.map(meeting => (
<Text size='medium' className={styles.meeting} key={meeting.startTime}>
<Text span size='medium' weight='bold' color='black'>
<Text /* size='medium' */ className={styles.meeting} key={meeting.startTime}>
<Text as='span' /* size='medium' weight='bold' */ color='black'>
{meeting.getDaysString({
format: 'long',
separator: 'short',
})}
</Text>
{' at '}
<Text span size='medium'>
<Text as='span' /* size='medium' */>
{meeting.getTimeString({
separator: 'to',
capitalize: true,
})}
</Text>
{' in '}
<Link
size='medium'
weight='normal'
/* size='medium'
weight='normal' */
title='View building on UT Map'
url={getBuildingUrl(meeting.location?.building)}
disabled={!meeting.location?.building}
Expand All @@ -98,7 +98,7 @@ export default function CourseHeader({ course, activeSchedule, onClose }: Props)
</Text>
))}

<CourseButtons course={course} activeSchedule={activeSchedule} />
{/* <CourseButtons course={course} activeSchedule={activeSchedule} /> */}
</Card>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,18 @@ export default function GradeDistribution({ course }: Props) {
{status === DataStatus.LOADING && <Spinner />}
{status === DataStatus.ERROR && (
<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
</Text>
<Icon color='speedway_brick' size='large' name='sentiment_dissatisfied' />
<Icon color='speedway_brick' /* size='large' */ name='sentiment_dissatisfied' />
</Card>
)}
{status === DataStatus.NOT_FOUND && (
<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
</Text>
<Icon color='charcoal' size='x_large' name='search_off' />
<Icon color='charcoal' /* size='x_large' */ name='search_off' />
</Card>
)}
</Card>
Expand Down
4 changes: 2 additions & 2 deletions src/views/components/injected/TableRow/TableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function TableRow({ row, isSelected, activeSchedule, onClick }: P
element.classList.remove(styles.isConflict);
setConflicts([]);
};
}, [activeSchedule, course]);
}, [activeSchedule, course, element.classList]);

if (!container) {
return null;
Expand All @@ -91,7 +91,7 @@ export default function TableRow({ row, isSelected, activeSchedule, onClick }: P
<div className={styles.conflictTooltip}>
<div className={styles.body}>
{conflicts.map(c => (
<Text size='small' key={c.uniqueId}>
<Text /* size='small' */ key={c.uniqueId}>
{c.department} {c.number} ({c.uniqueId})
</Text>
))}
Expand Down

0 comments on commit babc925

Please sign in to comment.