fix(learn): update project views for python

This commit is contained in:
Mrugesh Mohapatra
2020-05-22 03:24:17 +05:30
parent e21439d7e8
commit 9879d6e72b
5 changed files with 58 additions and 32 deletions

View File

@@ -34,7 +34,6 @@ import { isSignedInSelector } from '../../../../redux';
import Hotkeys from '../../components/Hotkeys';
import '../../components/test-frame.css';
import { backEndProject } from '../../../../../utils/challengeTypes';
const propTypes = {
challengeMounted: PropTypes.func.isRequired,
@@ -156,12 +155,10 @@ export class BackEnd extends Component {
},
tests,
executeChallenge,
updateSolutionFormValues,
updateBackendFormValues
} = this.props;
const blockNameTitle = `${blockName} - ${title}`;
const isBackEndProject = challengeType === backEndProject;
return (
<Hotkeys
@@ -182,14 +179,9 @@ export class BackEnd extends Component {
instructions={instructions}
/>
<SolutionForm
isFrontEnd={false}
isProject={isBackEndProject}
challengeType={challengeType}
onSubmit={executeChallenge}
updateSolutionForm={values =>
isBackEndProject
? updateSolutionFormValues(values)
: updateBackendFormValues(values)
}
updateSolutionForm={updateBackendFormValues}
/>
<ProjectToolPanel
guideUrl={getGuideUrl({ forumTopicId, title })}