Skip to content

Commit

Permalink
fix: added room number to course popup (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinsonzheng499 authored Sep 30, 2024
1 parent 75ad416 commit 9eaff24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/shared/types/CourseMeeting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class CourseMeeting {
}

startTimeString += startMinute === 0 ? ':00' : `:${startMinute}`;
startTimeString += startHour >= 12 ? 'pm' : 'am';
startTimeString += startHour >= 12 ? ' p.m.' : ' a.m.';

if (endHour === 0) {
endTimeString = '12';
Expand All @@ -118,7 +118,7 @@ export class CourseMeeting {
endTimeString = `${endHour}`;
}
endTimeString += endMinute === 0 ? ':00' : `:${endMinute}`;
endTimeString += endHour >= 12 ? 'pm' : 'am';
endTimeString += endHour >= 12 ? ' p.m.' : ' a.m.';

if (options.capitalize) {
startTimeString = startTimeString.toUpperCase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,12 @@ export default function HeadingAndActions({ course, activeSchedule, onClose }: H
const timeString = meeting.getTimeString({ separator: ' to ', capitalize: false });
return (
<Text
key={daysString + timeString + (meeting.location?.building ?? '')}
key={
daysString +
timeString +
(meeting.location?.building ?? '') +
(meeting.location?.room ?? '')
}
variant='h4'
as='p'
>
Expand All @@ -169,7 +174,7 @@ export default function HeadingAndActions({ course, activeSchedule, onClose }: H
className='link'
variant='h4'
>
{meeting.location.building}
{meeting.location.building} {meeting.location.room}
</Link>
</>
)}
Expand Down

0 comments on commit 9eaff24

Please sign in to comment.