fix: only show description in target editor

This commit is contained in:
Oliver Eyton-Williams
2020-07-27 12:42:17 +02:00
committed by Mrugesh Mohapatra
parent 2abefc27a2
commit 9a137573a7

View File

@@ -138,7 +138,6 @@ class MultifileEditor extends Component {
}; };
const { challengeFiles } = this.props; const { challengeFiles } = this.props;
const targetEditor = getTargetEditor(challengeFiles); const targetEditor = getTargetEditor(challengeFiles);
this.state = { this.state = {
@@ -207,6 +206,7 @@ class MultifileEditor extends Component {
// TODO: tabs should be dynamically created from the challengeFiles // TODO: tabs should be dynamically created from the challengeFiles
// TODO: the tabs mess up the rendering (scroll doesn't work properly and // TODO: the tabs mess up the rendering (scroll doesn't work properly and
// the in-editor description) // the in-editor description)
const targetEditor = getTargetEditor(challengeFiles);
return ( return (
<ReflexContainer <ReflexContainer
@@ -230,9 +230,9 @@ class MultifileEditor extends Component {
<Editor <Editor
challengeFiles={challengeFiles} challengeFiles={challengeFiles}
containerRef={containerRef} containerRef={containerRef}
// TODO: only pass description to the editor with the description={
// editable region targetEditor === 'indexhtml' ? description : null
description={description} }
fileKey='indexhtml' fileKey='indexhtml'
key='indexhtml' key='indexhtml'
ref={editorRef} ref={editorRef}
@@ -251,9 +251,9 @@ class MultifileEditor extends Component {
<Editor <Editor
challengeFiles={challengeFiles} challengeFiles={challengeFiles}
containerRef={containerRef} containerRef={containerRef}
// TODO: only pass description to the editor with the description={
// editable region targetEditor === 'indexcss' ? description : null
description={'this sentence is not here'} }
fileKey='indexcss' fileKey='indexcss'
key='indexcss' key='indexcss'
resizeProps={resizeProps} resizeProps={resizeProps}
@@ -272,9 +272,9 @@ class MultifileEditor extends Component {
<Editor <Editor
challengeFiles={challengeFiles} challengeFiles={challengeFiles}
containerRef={containerRef} containerRef={containerRef}
// TODO: only pass description to the editor with the description={
// editable region targetEditor === 'indexjs' ? description : null
description={'neither is this one'} }
fileKey='indexjs' fileKey='indexjs'
key='indexjs' key='indexjs'
resizeProps={resizeProps} resizeProps={resizeProps}