From 94ce7745864737f0b81a094fadaee9863157ad91 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Thu, 12 Sep 2024 15:38:32 +0100 Subject: [PATCH] Update comments --- src/components/Dashboard/PersonalDashboard.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Dashboard/PersonalDashboard.tsx b/src/components/Dashboard/PersonalDashboard.tsx index 5a57bd409..3c2e2aa1b 100644 --- a/src/components/Dashboard/PersonalDashboard.tsx +++ b/src/components/Dashboard/PersonalDashboard.tsx @@ -169,12 +169,14 @@ export function PersonalDashboard(props: PersonalDashboardProps) { ]; const relatedRoadmapIds = allRoadmapsAndBestPractices + // take the ones that user is learning .filter((roadmap) => learningRoadmapsToShow?.some( (learningRoadmap) => learningRoadmap.resourceId === roadmap.id, ), ) .flatMap((roadmap) => roadmap.relatedRoadmapIds) + // remove the ones that user is already learning or has bookmarked .filter( (roadmapId) => !learningRoadmapsToShow.some((lr) => lr.resourceId === roadmapId),