Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#310 Enable TBD Enrollment Times #459

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions csm_web/frontend/src/components/CourseMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

if (courses !== null) {
for (const course of courses.values()) {
show_enrollment_times ||= !course.enrollmentOpen;

Check warning on line 58 in csm_web/frontend/src/components/CourseMenu.tsx

View workflow job for this annotation

GitHub Actions / ESLint

csm_web/frontend/src/components/CourseMenu.tsx#L58

'show_enrollment_times' is assigned a value but never used (@typescript-eslint/no-unused-vars)
if (!course.enrollmentOpen) {
enrollment_times_by_course.push({
courseName: course.name,
Expand Down Expand Up @@ -215,7 +215,7 @@
return (
<React.Fragment>
<h3 className="page-title center-title">Which course would you like to enroll in?</h3>
{courses !== null ? (
{courses !== null && courses.size !== 0 ? (
<div id="course-menu">
{Array.from(courses.entries()).map(([id, course]) => (
<Link className="primary-btn" to={`${id}`} key={id}>
Expand All @@ -224,7 +224,10 @@
))}
</div>
) : (
<LoadingSpinner id="course-menu-loading-spinner" />
<div>
<br></br>
<h2 className="page-title center-title">Enrollment Times: TBD</h2>
</div>
)}
</React.Fragment>
);
Expand Down