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:
Shaun Hamilton
2025-11-24 11:06:17 +02:00
committed by GitHub
parent 152f8a59df
commit 981d0c301c
@@ -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' />