@@ -12,7 +12,7 @@ import {
1212 TCACertificationProgress ,
1313 TCACertificationProviderBase ,
1414} from '../../../learn-lib'
15- import { getTCACertificationPath } from '../../../learn.routes'
15+ import { getTCACertificateUrl , getTCACertificationPath } from '../../../learn.routes'
1616
1717import styles from './TCCertCard.module.scss'
1818
@@ -41,11 +41,22 @@ const TCCertCard: FC<TCCertCardProps> = (props: TCCertCardProps) => {
4141
4242 const isEnrolled : boolean = props . progress ?. status === 'enrolled'
4343
44+ const isCompleted : boolean = props . progress ?. status === 'completed'
45+
4446 function renderCta ( ) : ReactNode {
45- if ( ! isEnrolled ) {
47+ if ( ! isEnrolled && ! isCompleted ) {
4648 return getCtaBtn ( 'secondary' , 'Details' , getTCACertificationPath ( dashedName ) )
4749 }
4850
51+ if ( isCompleted ) {
52+ return (
53+ < div className = { styles . certCTAButtons } >
54+ { getCtaBtn ( 'primary' , 'View Certificate' , getTCACertificateUrl ( dashedName ) ) }
55+ { getCtaBtn ( 'secondary' , 'Details' , getTCACertificationPath ( dashedName ) ) }
56+ </ div >
57+ )
58+ }
59+
4960 return getCtaBtn ( 'primary' , 'Resume' , getTCACertificationPath ( dashedName ) )
5061 }
5162
@@ -62,7 +73,7 @@ const TCCertCard: FC<TCCertCardProps> = (props: TCCertCardProps) => {
6273 }
6374
6475 return (
65- < div className = { styles . wrap } >
76+ < div className = { classNames ( styles . wrap , isCompleted && styles . completed ) } >
6677 < div className = { styles . cardHeader } >
6778 < CertificateBadgeIcon
6879 type = { props . certification . certificationCategory . track }
@@ -130,7 +141,11 @@ const TCCertCard: FC<TCCertCardProps> = (props: TCCertCardProps) => {
130141 { props . certification . description . length > EXCERPT_TEXT_LEN ? '...' : '' }
131142 </ p >
132143
133- < SkillTags skills = { skills } courseKey = { dashedName } />
144+ < SkillTags
145+ skills = { skills }
146+ courseKey = { dashedName }
147+ theme = { isCompleted ? 'gray' : 'white' }
148+ />
134149
135150 < ProvidersLogoList
136151 className = { styles . providers }
0 commit comments