mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-07 18:03:49 -05:00
feat: add project name on timeline for challenges completed RWD (#46181)
This commit is contained in:
@@ -243,6 +243,7 @@ function useIdToNameMap(): Map<string, NameMap> {
|
||||
challenge {
|
||||
fields {
|
||||
slug
|
||||
blockName
|
||||
}
|
||||
id
|
||||
title
|
||||
@@ -268,11 +269,16 @@ function useIdToNameMap(): Map<string, NameMap> {
|
||||
// @ts-expect-error Graphql needs typing
|
||||
title,
|
||||
// @ts-expect-error Graphql needs typing
|
||||
fields: { slug }
|
||||
fields: { slug, blockName }
|
||||
}
|
||||
}
|
||||
}) => {
|
||||
idToNameMap.set(id, { challengeTitle: title, challengePath: slug });
|
||||
idToNameMap.set(id, {
|
||||
challengeTitle: `${
|
||||
title.includes('Step') ? `${blockName} - ` : ''
|
||||
}${title}`,
|
||||
challengePath: slug
|
||||
});
|
||||
}
|
||||
);
|
||||
return idToNameMap;
|
||||
|
||||
Reference in New Issue
Block a user