@@ -82,7 +82,13 @@ function parseEvent(id: number, event: Event, calendarId: string) {
8282}
8383
8484const Calendar = React . memo < CalendarProps > (
85- ( { semester, selectedCourses, newOfferingIds, restrictions, isChoosingSectionsManually } ) => {
85+ ( {
86+ semester,
87+ selectedCourses,
88+ newOfferingIds,
89+ restrictions,
90+ isChoosingSectionsManually,
91+ } ) => {
8692 const form = useForm < z . infer < typeof TimetableFormSchema > > ( ) ;
8793
8894 const navigate = useNavigate ( ) ;
@@ -323,12 +329,13 @@ const Calendar = React.memo<CalendarProps>(
323329 < div > Your Timetable</ div >
324330 { ! isEditingTimetable ? (
325331 < Dialog >
326- { isChoosingSectionsManually && ! allOfferingSectionsHaveBeenSelected && (
327- < p className = "text-sm text-red-500 pr-2" >
328- Please select all LEC/TUT/PRA sections for your courses in
329- order to save your timetable.
330- </ p >
331- ) }
332+ { isChoosingSectionsManually &&
333+ ! allOfferingSectionsHaveBeenSelected && (
334+ < p className = "text-sm text-red-500 pr-2" >
335+ Please select all LEC/TUT/PRA sections for your courses in
336+ order to save your timetable.
337+ </ p >
338+ ) }
332339 < DialogTrigger asChild >
333340 < Button
334341 size = "sm"
@@ -367,12 +374,13 @@ const Calendar = React.memo<CalendarProps>(
367374 </ Dialog >
368375 ) : (
369376 < >
370- { isChoosingSectionsManually && ! allOfferingSectionsHaveBeenSelected && (
371- < p className = "text-sm text-red-500 pr-2" >
372- Please select all LEC/TUT/PRA sections for your courses in
373- order to save your timetable.
374- </ p >
375- ) }
377+ { isChoosingSectionsManually &&
378+ ! allOfferingSectionsHaveBeenSelected && (
379+ < p className = "text-sm text-red-500 pr-2" >
380+ Please select all LEC/TUT/PRA sections for your courses in
381+ order to save your timetable.
382+ </ p >
383+ ) }
376384 < Button
377385 size = "sm"
378386 disabled = { ! allOfferingSectionsHaveBeenSelected }
0 commit comments