fix(dashboard): redirect to course start after auto-enroll (#741)

* fix(dashboard): redirect to course start after auto-enroll

After successful enrollment on the org-site enroll page, verified users
were always sent to /lms because resolvePostEnrollRedirect was hardcoded.
Restore the API redirectTo target (/courses/:id/lessons?next=true) so
students land on their first lesson, with /course/:slug as fallback.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* fix(dashboard): match LMS continue path after auto-enroll

Use the same student course continue URL as the LMS home page
(/courses/:id/lessons?next=true) via a shared helper, and navigate with
goto instead of a hard reload or org-site /course/:slug fallback.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

---------
Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>
This commit is contained in:
Rotimi Best
2026-07-12 22:06:40 +01:00
committed by GitHub
co-authored by Rotimi Best
parent 8bed9f6b4e
commit bce0f582ce
4 changed files with 9 additions and 7 deletions
@@ -0,0 +1,3 @@
export function getStudentCourseContinuePath(courseId: string): string {
return `/courses/${courseId}/lessons?next=true`;
}