mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(client): only show missing prerequisites if signed in (#64047)
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
This commit is contained in:
@@ -228,6 +228,9 @@ function ShowExamDownload({
|
||||
};
|
||||
});
|
||||
|
||||
const showPrereqAlert =
|
||||
isSignedIn && !examIdsQuery.isLoading && !getExamsQuery.isLoading;
|
||||
|
||||
return (
|
||||
<LearnLayout>
|
||||
<Helmet>
|
||||
@@ -246,15 +249,16 @@ function ShowExamDownload({
|
||||
{title}
|
||||
</ChallengeTitle>
|
||||
<Spacer size='m' />
|
||||
{missingPrerequisites.length > 0 ? (
|
||||
<MissingPrerequisites
|
||||
missingPrerequisites={missingPrerequisites}
|
||||
/>
|
||||
) : (
|
||||
<Callout className='exam-qualified' variant='info'>
|
||||
<p>{t('learn.exam.qualified')}</p>
|
||||
</Callout>
|
||||
)}
|
||||
{showPrereqAlert &&
|
||||
(missingPrerequisites.length > 0 ? (
|
||||
<MissingPrerequisites
|
||||
missingPrerequisites={missingPrerequisites}
|
||||
/>
|
||||
) : (
|
||||
<Callout className='exam-qualified' variant='info'>
|
||||
<p>{t('learn.exam.qualified')}</p>
|
||||
</Callout>
|
||||
))}
|
||||
<h2>{t('exam.download-header')}</h2>
|
||||
<p>{t('exam.explanation')}</p>
|
||||
<Spacer size='l' />
|
||||
|
||||
Reference in New Issue
Block a user