1- import React , { useState } from 'react' ;
1+ import React , { Fragment , useState } from 'react' ;
22import PT from 'prop-types' ;
33
44import './styles.scss' ;
@@ -20,25 +20,33 @@ const TcaCertificates = ({ certifications, courses, memberHandle }) => {
2020 Topcoder Academy
2121 </ h3 >
2222
23- < h4 styleName = "category-title" > Certifications</ h4 >
24- < List
25- certificates = { certifications }
26- isVerified
27- onClick = { certificate => setShowCertificationCertificate ( certificate ) }
28- renderIcon = { enrollment => (
29- < CertificationBadge
30- type = { enrollment . topcoderCertification . certificationCategory . track || 'DEV' }
31- level = { enrollment . topcoderCertification . learnerLevel || 'Beginner' }
23+ { certifications . length > 0 && (
24+ < Fragment >
25+ < h4 styleName = "category-title" > Certifications</ h4 >
26+ < List
27+ certificates = { certifications }
28+ isVerified
29+ onClick = { certificate => setShowCertificationCertificate ( certificate ) }
30+ renderIcon = { enrollment => (
31+ < CertificationBadge
32+ type = { enrollment . topcoderCertification . certificationCategory . track || 'DEV' }
33+ level = { enrollment . topcoderCertification . learnerLevel || 'Beginner' }
34+ />
35+ ) }
3236 />
33- ) }
34- />
35- < h4 styleName = "category-title" > Courses</ h4 >
36- < List
37- certificates = { courses }
38- isVerified
39- onClick = { certificate => setShowCourseCertificate ( certificate ) }
40- renderIcon = { certificate => < CourseBadge type = { certificate . certificationTrackType || 'DEV' } /> }
41- />
37+ </ Fragment >
38+ ) }
39+ { courses . length > 0 && (
40+ < Fragment >
41+ < h4 styleName = "category-title" > Courses</ h4 >
42+ < List
43+ certificates = { courses }
44+ isVerified
45+ onClick = { certificate => setShowCourseCertificate ( certificate ) }
46+ renderIcon = { certificate => < CourseBadge type = { certificate . certificationTrackType || 'DEV' } /> }
47+ />
48+ </ Fragment >
49+ ) }
4250
4351 { showCertificationCertificate && (
4452 < TcaCertificationCertificateModal
0 commit comments