Skip to content

Commit

Permalink
feat: lowercase instructor! (#268)
Browse files Browse the repository at this point in the history
Co-authored-by: Derek Chen <derex1987@gmail.com>
  • Loading branch information
sghsri and DereC4 authored Oct 5, 2024
1 parent 88eeb62 commit 9ec05ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/views/components/calendar/CalendarCourseCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 7 additions & 1 deletion src/views/hooks/useFlattenedCourseSchedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
Expand Down

0 comments on commit 9ec05ef

Please sign in to comment.