Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/src/app/(learn)/(main)/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ export default async function MenteeDashboardPage() {
await requireLearnSurface();
const model = await serverApiFetch<MenteeDashboardViewModel>("/api/v1/learner/dashboard");

// Only load starter catalog courses when the learner has no active courses yet.
// Only load starter catalog courses when the learner has no active courses yet, or when the
// first-run walkthrough will suggest courses.
const hasActiveCourse = model.courses.some((course) => course.state !== "DROPPED");
const starterCourses = hasActiveCourse
const starterCourses = hasActiveCourse && !model.firstRun?.show
? []
: await serverApiFetch<{ courses: CatalogCourseSummary[] }>("/api/v1/catalog")
.then((catalog) => withoutGuidedTracks(catalog.courses))
Expand Down
Loading
Loading