Skip to content

Commit a1348c8

Browse files
committed
TCA-1048 - remove certification wording in TCA certif curriculum
1 parent 0a7aa84 commit a1348c8

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

src-ts/tools/learn/certification-details/certification-curriculum/curriculum-cards/course-card/CourseCard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { FC, ReactNode } from 'react'
22

33
import { Button, IconSolid, ProgressBar } from '../../../../../../lib'
44
import {
5+
clearFCCCertificationTitle,
56
CompletionTimeRange,
67
LearnCertification,
78
LearnLevelIcon,
@@ -91,7 +92,7 @@ const CourseCard: FC<CourseCardProps> = (props: CourseCardProps) => {
9192
return (
9293
<CurriculumCard
9394
badgeTrackType={props.certification.certificationCategory.track ?? 'DEV'}
94-
title={props.certification.title ?? 'Responsive Web Design Certification'}
95+
title={clearFCCCertificationTitle(props.certification.title)}
9596
cta={renderCta()}
9697
status={props.isEnrolled ? props.progress?.status : undefined}
9798
content={(
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Removes the "certification" at the end of an FCC certificaiton's title
3+
*/
4+
export const clearFCCCertificationTitle: (title: string) => string = (title: string): string => (
5+
title.replace(/\s*Certification\s*$/i, '')
6+
)

src-ts/tools/learn/learn-lib/functions/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ export {
66
putAsync as learnXhrPutAsync,
77
} from './learn-xhr.functions'
88
export { hideSiblings } from './hide-siblings'
9+
export * from './clean-fcc-certif-title'

src-ts/tools/learn/learn-lib/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export * from './course-outline'
66
export * from './course-title'
77
export * from './curriculum-summary'
88
export * from './data-providers'
9+
export * from './functions'
910
export * from './dynamic-icons'
1011
export * from './learn-breadcrumb-provider'
1112
export * from './learn-swr'

0 commit comments

Comments
 (0)