Skip to content

Commit

Permalink
test(web): fix testChallenge feature in static build
Browse files Browse the repository at this point in the history
  • Loading branch information
kantord committed Jul 12, 2021
1 parent 8ad3efd commit 227622e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 3 additions & 1 deletion apps/web/src/components/ChallengeScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
const skillId = skillData.id

return {
testChallenge: page.query.testChallenge,
rawChallenges: Array.from(rawChallenges),
languageName,
languageCode,
Expand All @@ -36,7 +35,6 @@
export let rawChallenges
export let languageName: string
export let languageCode: string
export let testChallenge: string | undefined
export let specialCharacters: Array<string>
export let id: string
export let courseURL: string
Expand All @@ -56,7 +54,6 @@
<NavBar />

<ChallengeScreen
{testChallenge}
{expectedNumberOfChallenges}
{skillId}
{rawChallenges}
Expand Down

1 comment on commit 227622e

@vercel
Copy link

@vercel vercel bot commented on 227622e Jul 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.