mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-13 06:04:13 -04:00
fix(client): only show live certifications (#57602)
This commit is contained in:
committed by
GitHub
parent
91c9b10e58
commit
174eec287a
@@ -25,7 +25,8 @@ import {
|
||||
signInLoadingSelector
|
||||
} from '../../redux/selectors';
|
||||
import type { ChallengeNode, User } from '../../redux/prop-types';
|
||||
import { CertTitle } from '../../../config/cert-and-project-map';
|
||||
import { CertTitle, liveCerts } from '../../../config/cert-and-project-map';
|
||||
import { superBlockToCertMap } from '../../../../shared/config/certification-settings';
|
||||
import Block from './components/block';
|
||||
import CertChallenge from './components/cert-challenge';
|
||||
import LegacyLinks from './components/legacy-links';
|
||||
@@ -187,15 +188,9 @@ const SuperBlockIntroductionPage = (props: SuperBlockProp) => {
|
||||
|
||||
const i18nTitle = getSuperBlockTitleForMap(superBlock);
|
||||
|
||||
const superblockWithoutCert = [
|
||||
SuperBlocks.RespWebDesign,
|
||||
SuperBlocks.CodingInterviewPrep,
|
||||
SuperBlocks.TheOdinProject,
|
||||
SuperBlocks.ProjectEuler,
|
||||
SuperBlocks.A2English,
|
||||
SuperBlocks.RosettaCode,
|
||||
SuperBlocks.PythonForEverybody
|
||||
];
|
||||
const showCertification = liveCerts.some(
|
||||
cert => superBlockToCertMap[superBlock] === cert.certSlug
|
||||
);
|
||||
|
||||
const superBlockWithAccordionView = [SuperBlocks.FullStackDeveloper];
|
||||
const chosenBlock = getChosenBlock();
|
||||
@@ -255,7 +250,7 @@ const SuperBlockIntroductionPage = (props: SuperBlockProp) => {
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{!superblockWithoutCert.includes(superBlock) && (
|
||||
{showCertification && (
|
||||
<CertChallenge
|
||||
certification={certification}
|
||||
superBlock={superBlock}
|
||||
|
||||
Reference in New Issue
Block a user