diff --git a/apps/web/src/components/ChallengeScreen.svelte b/apps/web/src/components/ChallengeScreen.svelte index a40f33130053..33f24841cf0e 100644 --- a/apps/web/src/components/ChallengeScreen.svelte +++ b/apps/web/src/components/ChallengeScreen.svelte @@ -12,6 +12,7 @@ // TODO: deal with this ignore comment // eslint-disable-next-line @typescript-eslint/no-unused-vars import db from "../db/db" + import isBrowser from "../utils/isBrowser" export let rawChallenges export let languageName @@ -21,7 +22,8 @@ export let courseURL export let skillId export let expectedNumberOfChallenges - export let testChallenge + + const testChallenge = isBrowser() && new URLSearchParams(window.location.search).get("testChallenge") type CardChallengeType = { id: string diff --git a/apps/web/src/routes/course/[courseName]/skill/[id]/index.svelte b/apps/web/src/routes/course/[courseName]/skill/[id]/index.svelte index 4fcd8cfe41f3..3eff201736d6 100644 --- a/apps/web/src/routes/course/[courseName]/skill/[id]/index.svelte +++ b/apps/web/src/routes/course/[courseName]/skill/[id]/index.svelte @@ -15,7 +15,6 @@ const skillId = skillData.id return { - testChallenge: page.query.testChallenge, rawChallenges: Array.from(rawChallenges), languageName, languageCode, @@ -36,7 +35,6 @@ export let rawChallenges export let languageName: string export let languageCode: string - export let testChallenge: string | undefined export let specialCharacters: Array export let id: string export let courseURL: string @@ -56,7 +54,6 @@