diff --git a/client/src/templates/Challenges/classic/editor.tsx b/client/src/templates/Challenges/classic/editor.tsx index 17455f4133cb37..6651a6657dd5f1 100644 --- a/client/src/templates/Challenges/classic/editor.tsx +++ b/client/src/templates/Challenges/classic/editor.tsx @@ -109,6 +109,7 @@ interface EditorProps { usesMultifileEditor: boolean; isChallengeCompleted: boolean; testsRunning: boolean; + showRightsReserved?: boolean; } // TODO: this is grab bag of unrelated properties. There's no need for them to @@ -1128,16 +1129,18 @@ const Editor = (props: EditorProps): JSX.Element => { theme={editorTheme} /> -
- - © {currentYear}, freeCodeCamp. All rights reserved. - - -
+ {props.showRightsReserved && ( +
+ + © {currentYear}, freeCodeCamp. All rights reserved. + + +
+ )} ); }; diff --git a/client/src/templates/Challenges/classic/multifile-editor.tsx b/client/src/templates/Challenges/classic/multifile-editor.tsx index 0fc5ba87add8a9..22f1d7290397bc 100644 --- a/client/src/templates/Challenges/classic/multifile-editor.tsx +++ b/client/src/templates/Challenges/classic/multifile-editor.tsx @@ -42,6 +42,7 @@ interface MultifileEditorProps { resizeProps: ResizeProps; title: string; showProjectPreview: boolean; + showRightsReserved?: boolean; usesMultifileEditor: boolean; visibleEditors: { indexhtml?: boolean; @@ -121,7 +122,7 @@ const MultifileEditor = (props: MultifileEditorProps) => { > - {editorAndSplitterKeys.map(key => { + {editorAndSplitterKeys.map((key, i) => { const isSplitter = key.endsWith('-splitter'); if (isSplitter) { return ( @@ -147,6 +148,7 @@ const MultifileEditor = (props: MultifileEditorProps) => { title={title} usesMultifileEditor={usesMultifileEditor} showProjectPreview={showProjectPreview} + showRightsReserved={props.showRightsReserved && !i} /> ); diff --git a/client/src/templates/Challenges/classic/show.tsx b/client/src/templates/Challenges/classic/show.tsx index a012a9c3bfce43..8ca27cddf2d433 100644 --- a/client/src/templates/Challenges/classic/show.tsx +++ b/client/src/templates/Challenges/classic/show.tsx @@ -345,7 +345,7 @@ class ShowClassic extends Component { ); } - renderEditor() { + renderEditor(hasEditableBoundaries?: boolean) { const { pageContext: { projectPreview: { showProjectPreview } @@ -376,6 +376,7 @@ class ShowClassic extends Component { title={title} usesMultifileEditor={usesMultifileEditor} showProjectPreview={showProjectPreview} + showRightsReserved={hasEditableBoundaries} /> ) ); @@ -465,7 +466,7 @@ class ShowClassic extends Component { block={block} challengeFiles={challengeFiles} challengeType={challengeType} - editor={this.renderEditor()} + editor={this.renderEditor(hasEditableBoundaries)} hasEditableBoundaries={hasEditableBoundaries} hasNotes={!!notes} hasPreview={this.hasPreview()} diff --git a/client/src/templates/Challenges/components/tool-panel.tsx b/client/src/templates/Challenges/components/tool-panel.tsx index 10d406d00b3e1f..01b474408de873 100644 --- a/client/src/templates/Challenges/components/tool-panel.tsx +++ b/client/src/templates/Challenges/components/tool-panel.tsx @@ -1,7 +1,5 @@ import { Button, - DropdownButton, - MenuItem } from '@freecodecamp/react-bootstrap'; import React from 'react'; import { useTranslation } from 'react-i18next'; @@ -68,11 +66,7 @@ function ToolPanel({ isMobile, isSignedIn, isRunningTests, - openHelpModal, - openVideoModal, openResetModal, - guideUrl, - videoUrl, challengeIsCompleted, submitChallenge }: ToolPanelProps) { @@ -121,40 +115,6 @@ function ToolPanel({ {isMobile ? t('buttons.reset') : t('buttons.reset-code')} )} - - {guideUrl ? ( - - {t('buttons.get-hint')} - - ) : null} - {videoUrl ? ( - - {t('buttons.watch-video')} - - ) : null} - - {t('buttons.ask-for-help')} - - ); }