Problem
src/containers/course-details/curriculam-panel.tsx contains: TODO: Replace with actual course enrollment check from database. Current enrollment indicator shown to users is not sourced from the Enrollment table.
Expected behavior
Enrollment status reflects the real Enrollment record for the current user + course.
Acceptance criteria
Suggested approach
Fetch Enrollment in getServerSideProps for the course-detail page and pass enrollment state down as a prop. Don't hit the DB from the client.
Problem
src/containers/course-details/curriculam-panel.tsxcontains:TODO: Replace with actual course enrollment check from database. Current enrollment indicator shown to users is not sourced from theEnrollmenttable.Expected behavior
Enrollment status reflects the real
Enrollmentrecord for the current user + course.Acceptance criteria
Enrollment.status.Suggested approach
Fetch
EnrollmentingetServerSidePropsfor the course-detail page and pass enrollment state down as a prop. Don't hit the DB from the client.