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

@@ -55,8 +55,7 @@ export default function HeadingAndActions({ course, activeSchedule, onClose }: H
const formattedUniqueId = uniqueId.toString().padStart(5, '0');
const isInCalendar = useCalendar();
const getInstructorFullName = (instructor: Instructor) =>
instructor.toString({ format: 'first_last', case: 'capitalize' });
const getInstructorFullName = (instructor: Instructor) => instructor.toString({ format: 'first_last' });
const handleCopy = () => {
navigator.clipboard.writeText(formattedUniqueId);