1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-30 12:40:03 +02:00

Fix personalization not working

This commit is contained in:
Kamran Ahmed
2025-07-29 19:02:56 +01:00
parent 7f1da76f38
commit 7e1c9b18e5

View File

@@ -153,16 +153,13 @@ export function PersonalizedRoadmap(props: PersonalizedRoadmapProps) {
});
} else if (userProgress?.personalized) {
const { topicIds } = userProgress.personalized;
const remainingTopicIds = allPendingNodeIds.filter(
(nodeId) => !topicIds.includes(nodeId),
);
remainingTopicIds.forEach((topicId) => {
renderTopicProgress(topicId, 'skipped');
});
topicIds.forEach((topicId) => {
if (!alreadyInProgressNodeIds.has(topicId)) {
// user is asking for personalized roadmap, we need to
// mark all the pending ids which are in the personalized roadmap
// as skipped and mark the rest as pending
allPendingNodeIds.forEach((topicId) => {
if (topicIds.includes(topicId)) {
renderTopicProgress(topicId, 'skipped');
} else {
renderTopicProgress(topicId, 'pending');
}
});