mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-31 04:59:50 +02:00
Fix personalization not working
This commit is contained in:
@@ -153,16 +153,13 @@ export function PersonalizedRoadmap(props: PersonalizedRoadmapProps) {
|
|||||||
});
|
});
|
||||||
} else if (userProgress?.personalized) {
|
} else if (userProgress?.personalized) {
|
||||||
const { topicIds } = userProgress.personalized;
|
const { topicIds } = userProgress.personalized;
|
||||||
const remainingTopicIds = allPendingNodeIds.filter(
|
// user is asking for personalized roadmap, we need to
|
||||||
(nodeId) => !topicIds.includes(nodeId),
|
// mark all the pending ids which are in the personalized roadmap
|
||||||
);
|
// as skipped and mark the rest as pending
|
||||||
|
allPendingNodeIds.forEach((topicId) => {
|
||||||
remainingTopicIds.forEach((topicId) => {
|
if (topicIds.includes(topicId)) {
|
||||||
renderTopicProgress(topicId, 'skipped');
|
renderTopicProgress(topicId, 'skipped');
|
||||||
});
|
} else {
|
||||||
|
|
||||||
topicIds.forEach((topicId) => {
|
|
||||||
if (!alreadyInProgressNodeIds.has(topicId)) {
|
|
||||||
renderTopicProgress(topicId, 'pending');
|
renderTopicProgress(topicId, 'pending');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user