|
|
@ -169,12 +169,14 @@ export function PersonalDashboard(props: PersonalDashboardProps) { |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
const relatedRoadmapIds = allRoadmapsAndBestPractices |
|
|
|
const relatedRoadmapIds = allRoadmapsAndBestPractices |
|
|
|
|
|
|
|
// take the ones that user is learning
|
|
|
|
.filter((roadmap) => |
|
|
|
.filter((roadmap) => |
|
|
|
learningRoadmapsToShow?.some( |
|
|
|
learningRoadmapsToShow?.some( |
|
|
|
(learningRoadmap) => learningRoadmap.resourceId === roadmap.id, |
|
|
|
(learningRoadmap) => learningRoadmap.resourceId === roadmap.id, |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
) |
|
|
|
.flatMap((roadmap) => roadmap.relatedRoadmapIds) |
|
|
|
.flatMap((roadmap) => roadmap.relatedRoadmapIds) |
|
|
|
|
|
|
|
// remove the ones that user is already learning or has bookmarked
|
|
|
|
.filter( |
|
|
|
.filter( |
|
|
|
(roadmapId) => |
|
|
|
(roadmapId) => |
|
|
|
!learningRoadmapsToShow.some((lr) => lr.resourceId === roadmapId), |
|
|
|
!learningRoadmapsToShow.some((lr) => lr.resourceId === roadmapId), |
|
|
|