fix(client): show icons on coming soon chapters (#57612)

This commit is contained in:
Tom 2024-12-19 03:48:15 -06:00 committed by GitHub
parent 423db476de
commit 5583032ae4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,7 +130,7 @@ const ComingSoon = ({ children }: { children: ReactNode }) => {
const { t } = useTranslation();
return (
<li className='coming-soon'>
<span className='badge'>{t('misc.coming-soon')}</span> {children}
{children} <span className='badge'>{t('misc.coming-soon')}</span>
</li>
);
};
@ -196,9 +196,17 @@ export const SuperBlockAccordion = ({
// show coming soon on production, and all the challenges in dev
if (chapter.comingSoon && !showUpcomingChanges) {
return (
<ComingSoon key={chapter.name}>
{t(`intro:full-stack-developer.chapters.${chapter.name}`)}
</ComingSoon>
<>
<ComingSoon key={chapter.name}>
{Object.values(FsdChapters).includes(chapter.name) && (
<ChapterIcon
className='map-icon'
chapter={chapter.name as FsdChapters}
/>
)}
{t(`intro:full-stack-developer.chapters.${chapter.name}`)}
</ComingSoon>
</>
);
}