fix: added room number to course popup (#231)

This commit is contained in:
vinsonzheng499
2024-09-30 09:47:40 -05:00
committed by GitHub
parent 75ad4167b6
commit 9eaff24cbb
2 changed files with 9 additions and 4 deletions

View File

@@ -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';
@@ -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();

View File

@@ -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'
>
@@ -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>
</>
)}