fix(client): only fetch exam data if signed in (#63356)

This commit is contained in:
Shaun Hamilton
2025-10-31 13:21:27 +02:00
committed by GitHub
parent 4584d51834
commit ae615ba4c5
@@ -79,8 +79,12 @@ function ShowExamDownload({
const [downloadLink, setDownloadLink] = useState<string | undefined>('');
const [downloadLinks, setDownloadLinks] = useState<string[]>([]);
const getExamsQuery = examAttempts.useGetExamsQuery();
const examIdsQuery = examAttempts.useGetExamIdsByChallengeIdQuery(id);
const getExamsQuery = examAttempts.useGetExamsQuery(undefined, {
skip: !isSignedIn
});
const examIdsQuery = examAttempts.useGetExamIdsByChallengeIdQuery(id, {
skip: !isSignedIn
});
const os = useDetectOS();
@@ -175,8 +179,6 @@ function ShowExamDownload({
};
});
console.log('missing prerequisites:', missingPrerequisites);
return (
<LearnLayout>
<Helmet>