diff --git a/client/src/templates/Challenges/classic/show.tsx b/client/src/templates/Challenges/classic/show.tsx index f1ed56218ef30c..59da3443d240df 100644 --- a/client/src/templates/Challenges/classic/show.tsx +++ b/client/src/templates/Challenges/classic/show.tsx @@ -204,7 +204,7 @@ function ShowClassic({ }, pageContext: { challengeMeta, - challengeMeta: { isFirstStep, nextChallengePath, prevChallengePath }, + challengeMeta: { isFirstStep, nextChallengePath }, projectPreview: { challengeData } }, createFiles, @@ -445,8 +445,6 @@ function ShowClassic({ executeChallenge={executeChallenge} containerRef={containerRef} instructionsPanelRef={instructionsPanelRef} - nextChallengePath={nextChallengePath} - prevChallengePath={prevChallengePath} usesMultifileEditor={usesMultifileEditor} editorRef={editorRef} > diff --git a/client/src/templates/Challenges/codeally/show.tsx b/client/src/templates/Challenges/codeally/show.tsx index 2805b6c492bae4..ec3074ff68faf3 100644 --- a/client/src/templates/Challenges/codeally/show.tsx +++ b/client/src/templates/Challenges/codeally/show.tsx @@ -130,9 +130,6 @@ function ShowCodeAlly(props: ShowCodeAllyProps) { }, isChallengeCompleted, isSignedIn, - pageContext: { - challengeMeta: { nextChallengePath, prevChallengePath } - }, partiallyCompletedChallenges, t, updateSolutionFormValues @@ -260,11 +257,7 @@ function ShowCodeAlly(props: ShowCodeAllyProps) { }; return ( - + diff --git a/client/src/templates/Challenges/components/hotkeys.tsx b/client/src/templates/Challenges/components/hotkeys.tsx index aba3b7217aa5ff..cec6e77d73f1ff 100644 --- a/client/src/templates/Challenges/components/hotkeys.tsx +++ b/client/src/templates/Challenges/components/hotkeys.tsx @@ -3,13 +3,13 @@ import React from 'react'; import { HotKeys, GlobalHotKeys } from 'react-hotkeys'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; + import type { ChallengeFiles, Test, User, ChallengeMeta } from '../../../redux/prop-types'; - import { userSelector } from '../../../redux/selectors'; import { setEditorFocusability, @@ -20,6 +20,7 @@ import { import { canFocusEditorSelector, challengeFilesSelector, + challengeMetaSelector, challengeTestsSelector, isHelpModalOpenSelector, isProjectPreviewModalOpenSelector, @@ -39,6 +40,7 @@ const mapStateToProps = createSelector( challengeFilesSelector, challengeTestsSelector, userSelector, + challengeMetaSelector, ( isHelpModalOpen: boolean, isResetModalOpen: boolean, @@ -47,7 +49,8 @@ const mapStateToProps = createSelector( canFocusEditor: boolean, challengeFiles: ChallengeFiles, tests: Test[], - user: User + user: User, + { nextChallengePath, prevChallengePath }: ChallengeMeta ) => ({ isHelpModalOpen, isResetModalOpen, @@ -56,7 +59,9 @@ const mapStateToProps = createSelector( canFocusEditor, challengeFiles, tests, - user + user, + nextChallengePath, + prevChallengePath }) ); diff --git a/client/src/templates/Challenges/exam/show.tsx b/client/src/templates/Challenges/exam/show.tsx index 8e59ab95afd3f1..fa17192de0a97c 100644 --- a/client/src/templates/Challenges/exam/show.tsx +++ b/client/src/templates/Challenges/exam/show.tsx @@ -164,9 +164,6 @@ function ShowExam(props: ShowExamProps) { isChallengeCompleted, openExitExamModal, openFinishExamModal, - pageContext: { - challengeMeta: { nextChallengePath, prevChallengePath } - }, t } = props; @@ -485,11 +482,7 @@ function ShowExam(props: ShowExamProps) { ) : ( - + diff --git a/client/src/templates/Challenges/fill-in-the-blank/show.tsx b/client/src/templates/Challenges/fill-in-the-blank/show.tsx index 3a96ff0083e859..0b4e5f2baf1adf 100644 --- a/client/src/templates/Challenges/fill-in-the-blank/show.tsx +++ b/client/src/templates/Challenges/fill-in-the-blank/show.tsx @@ -178,8 +178,6 @@ const ShowFillInTheBlank = ({ handleSubmit()} containerRef={container} - nextChallengePath={challengeMeta.nextChallengePath} - prevChallengePath={challengeMeta.prevChallengePath} playScene={() => handlePlayScene(true)} > diff --git a/client/src/templates/Challenges/generic/show.tsx b/client/src/templates/Challenges/generic/show.tsx index 47426b3d16092f..129a1e528701ec 100644 --- a/client/src/templates/Challenges/generic/show.tsx +++ b/client/src/templates/Challenges/generic/show.tsx @@ -96,7 +96,6 @@ const ShowGeneric = ({ isChallengeCompleted }: ShowQuizProps) => { const { t } = useTranslation(); - const { nextChallengePath, prevChallengePath } = challengeMeta; const container = useRef(null); const blockNameTitle = `${t( @@ -176,8 +175,6 @@ const ShowGeneric = ({ setIsScenePlaying(true) : undefined} > diff --git a/client/src/templates/Challenges/ms-trophy/show.tsx b/client/src/templates/Challenges/ms-trophy/show.tsx index bf7dfa7ede328f..734bc21f060beb 100644 --- a/client/src/templates/Challenges/ms-trophy/show.tsx +++ b/client/src/templates/Challenges/ms-trophy/show.tsx @@ -145,9 +145,6 @@ function MsTrophy(props: MsTrophyProps) { isProcessing, msUsername, openHelpModal, - pageContext: { - challengeMeta: { nextChallengePath, prevChallengePath } - }, t } = props; @@ -156,11 +153,7 @@ function MsTrophy(props: MsTrophyProps) { )} - ${title}`; return ( - + { }, isChallengeCompleted, output, - pageContext: { - challengeMeta: { nextChallengePath, prevChallengePath } - }, t, tests, updateSolutionFormValues @@ -164,11 +161,7 @@ const ShowBackEnd = (props: BackEndProps) => { )} - ${title}`; return ( - + { } }, isChallengeCompleted, - pageContext: { - challengeMeta: { nextChallengePath, prevChallengePath } - }, t, updateSolutionFormValues } = props; @@ -134,11 +131,7 @@ const ShowFrontEndProject = (props: ProjectProps) => { )} - ${title}`; return ( - + (null); // Campers are not allowed to change their answers once the quiz is submitted. @@ -282,8 +281,6 @@ const ShowQuiz = ({