mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(client): only fetch exam data if signed in (#63356)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user