feat: add project name on timeline for challenges completed RWD (#46181)

This commit is contained in:
Jordan Moore
2022-05-28 00:15:03 -05:00
committed by GitHub
parent f48641ed09
commit 5f7d87daf0

View File

@@ -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;