@@ -58,7 +58,6 @@ const TCACertificationBanner: FC<TCACertificationBannerProps> = (props: TCACerti
5858 // Fetch Enrollment status & progress
5959 const {
6060 progress : certifProgress ,
61- ready : certifProgressReady ,
6261 } : TCACertificationProgressProviderData = useGetTCACertificationProgress (
6362 props . userId as unknown as string ,
6463 certification ?. dashedName as string ,
@@ -69,9 +68,7 @@ const TCACertificationBanner: FC<TCACertificationBannerProps> = (props: TCACerti
6968 // so we can show their progress even before they enroll with the certification
7069 const {
7170 progresses : certsProgress ,
72- } : UserCertificationsProviderData = useGetUserCertifications ( 'freeCodeCamp' , {
73- enabled : certifProgressReady && ! certifProgress ,
74- } )
71+ } : UserCertificationsProviderData = useGetUserCertifications ( 'freeCodeCamp' )
7572
7673 const progressById : ProgressByIdCollection = useMemo ( ( ) => (
7774 certsProgress ?. reduce ( ( all , progress ) => {
@@ -97,22 +94,21 @@ const TCACertificationBanner: FC<TCACertificationBannerProps> = (props: TCACerti
9794 : certification . certificationResources . filter ( d => (
9895 progressById [ d . freeCodeCampCertification . fccId ] ?. status === UserCertificationProgressStatus . completed
9996 ) ) . length
97+ const inProgressCoursesCount : number = certification . certificationResources . filter ( d => (
98+ progressById [ d . freeCodeCampCertification . fccId ] ?. status === UserCertificationProgressStatus . inProgress
99+ ) ) . length
100100
101101 if ( ! completedCoursesCount ) {
102- return certifProgress ? getStatusBox (
102+ return inProgressCoursesCount ? getStatusBox (
103+ < IconOutline . ClockIcon /> ,
104+ `Good job! You are making progress with ${ inProgressCoursesCount } of ${ coursesCount } required courses.` ,
105+ 'green' ,
106+ ) : certifProgress ? getStatusBox (
103107 < IconOutline . DotsCircleHorizontalIcon /> ,
104108 'Begin working towards earning this Topcoder Certification by starting this course today!' ,
105109 ) : < > </ >
106110 }
107111
108- if ( completedCoursesCount === 1 ) {
109- return getStatusBox (
110- < IconOutline . ClockIcon /> ,
111- `Good job! You are making progress with 1 of ${ coursesCount } required courses.` ,
112- 'green' ,
113- )
114- }
115-
116112 return getStatusBox (
117113 < IconSolid . CheckCircleIcon /> ,
118114 `You have completed ${ completedCoursesCount } of ${ coursesCount } required courses.` ,
0 commit comments