Skip to content

Commit 98fa2b0

Browse files
authored
Merge pull request #277 from topcoder-platform/TCA-366_certificate-flickering
TCA-366 - Certificate view is flickering when trackType isn't DEV
2 parents 7cdfbe5 + a2e92aa commit 98fa2b0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src-ts/tools/learn/course-certificate/certificate-view/CertificateView.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ const CertificateView: FC<CertificateViewProps> = (props: CertificateViewProps)
6666
const {
6767
certification: certificate,
6868
ready: certificateReady,
69-
}: AllCertificationsProviderData = useAllCertifications(props.provider, course?.certificationId)
69+
}: AllCertificationsProviderData = useAllCertifications(
70+
props.provider,
71+
course?.certificationId,
72+
{enabled: !!course?.certificationId}
73+
)
7074

7175
const ready: boolean = useMemo(() => (
7276
completedCertificateReady && courseReady && certificateReady
@@ -142,7 +146,7 @@ const CertificateView: FC<CertificateViewProps> = (props: CertificateViewProps)
142146
<>
143147
<LoadingSpinner hide={ready} />
144148

145-
{readyAndCompletedCertification && (
149+
{ready && readyAndCompletedCertification && (
146150
<div className={styles['wrap']}>
147151
<div className={styles['content-wrap']}>
148152
{!props.hideActions && (

src-ts/tools/learn/course-certificate/certificate-view/certificate/certificate-bg-pattern/CertificateBgPattern.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import classNames from 'classnames'
22
import { FC } from 'react'
33

4+
import { LearnCertificateTrackType } from '../../../../learn-lib'
5+
46
import styles from './CertificateBgPattern.module.scss'
57

68
interface CertificateBgPatternProps {
7-
type: 'QA'|'DEV'|'DATASCIENCE'|'DESIGN'
9+
type: LearnCertificateTrackType
810
}
911

1012
const CertificateBgPattern: FC<CertificateBgPatternProps> = (props: CertificateBgPatternProps) => {

0 commit comments

Comments
 (0)