fix: instructor formatting errors (#425)

* fix: instructor formatting errors

* refactor: simplify logic in Instructor toString, remove unused formatters

* refactor: remove "unnecessary" else's after returns

I think it looks worse like this but whatever
This commit is contained in:
Samuel Gunter
2024-11-19 19:28:38 -06:00
committed by GitHub
parent 19e3838df2
commit 8b922082a7
4 changed files with 31 additions and 53 deletions

View File

@@ -84,7 +84,7 @@ export default function PopupCourseBlock({
<Text className={clsx('flex-1 py-3.5 truncate', fontColor)} variant='h1-course'>
<span className='px-0.5 font-450'>{formattedUniqueId}</span> {course.department} {course.number}
{course.instructors.length > 0 ? <> &ndash; </> : ''}
{course.instructors.map(v => v.toString({ format: 'last', case: 'capitalize' })).join('; ')}
{course.instructors.map(v => v.toString({ format: 'last' })).join('; ')}
</Text>
{enableCourseStatusChips && course.status !== Status.OPEN && (
<div