feat: lowercase instructor! (#268)

Co-authored-by: Derek Chen <derex1987@gmail.com>
This commit is contained in:
Sriram Hariharan
2024-10-04 22:44:57 -05:00
committed by GitHub
parent 88eeb620ae
commit 9ec05ef764
2 changed files with 8 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ export default function CalendarCourseCell({
return (
<div
className={clsx(
'h-full w-0 flex justify-center rounded p-2 cursor-pointer screenshot:p-1.5 hover:shadow-md transition-shadow-100 ease-out',
'h-full w-0 flex justify-center rounded p-x-2 p-y-1.2 cursor-pointer screenshot:p-1.5 hover:shadow-md transition-shadow-100 ease-out',
{
'min-w-full': timeAndLocation,
'w-full': !timeAndLocation,

View File

@@ -86,7 +86,13 @@ function extractCourseInfo(course: Course) {
status,
schedule: { meetings },
} = course;
const courseDeptAndInstr = `${course.department} ${course.number} ${course.instructors[0]?.lastName}`;
let courseDeptAndInstr = `${course.department} ${course.number}`;
const mainInstructor = course.instructors[0];
if (mainInstructor) {
courseDeptAndInstr += ` ${mainInstructor.toString({ format: 'first_last', case: 'capitalize' })}`;
}
return { status, courseDeptAndInstr, meetings, course };
}