feat: lowercase instructor! (#268)
Co-authored-by: Derek Chen <derex1987@gmail.com>
This commit is contained in:
@@ -61,7 +61,7 @@ export default function CalendarCourseCell({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
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,
|
'min-w-full': timeAndLocation,
|
||||||
'w-full': !timeAndLocation,
|
'w-full': !timeAndLocation,
|
||||||
|
|||||||
@@ -86,7 +86,13 @@ function extractCourseInfo(course: Course) {
|
|||||||
status,
|
status,
|
||||||
schedule: { meetings },
|
schedule: { meetings },
|
||||||
} = course;
|
} = 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 };
|
return { status, courseDeptAndInstr, meetings, course };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user