From ae615ba4c520140e87b7c9ee4934731b8c488084 Mon Sep 17 00:00:00 2001 From: Shaun Hamilton Date: Fri, 31 Oct 2025 13:21:27 +0200 Subject: [PATCH] fix(client): only fetch exam data if signed in (#63356) --- client/src/templates/Challenges/exam-download/show.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client/src/templates/Challenges/exam-download/show.tsx b/client/src/templates/Challenges/exam-download/show.tsx index b6c989a7530..61052800cab 100644 --- a/client/src/templates/Challenges/exam-download/show.tsx +++ b/client/src/templates/Challenges/exam-download/show.tsx @@ -79,8 +79,12 @@ function ShowExamDownload({ const [downloadLink, setDownloadLink] = useState(''); const [downloadLinks, setDownloadLinks] = useState([]); - 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 (