Skip to content

Commit

Permalink
Fix sectionFull conditionals (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshoTheMosho authored Sep 12, 2023
1 parent cf469bf commit 285c5db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/scheduler/components/SchedulerSections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ export const Option = forwardRef<OptionsProps, 'div'>(function Option(
?.trim()
?.replace(/^(.{200}).+/, '$1…');

const sectionFull = seats?.enrollment === seats?.maxEnrollment;
const waitlistFull = seats?.waitCount === seats?.waitCapacity;
const sectionFull = (seats?.enrollment ?? 0) >= (seats?.maxEnrollment ?? 0);
const waitlistFull = (seats?.waitCount ?? 0) >= (seats?.waitCapacity ?? 0);

function Time({ time }: { time: string }) {
const [start, end] = time.split('-');
Expand Down

0 comments on commit 285c5db

Please sign in to comment.