fix(client): update editor when code is reset

This commit is contained in:
Oliver Eyton-Williams
2020-06-03 16:32:24 +02:00
committed by Mrugesh Mohapatra
parent 10d2559fee
commit a959d462e9

View File

@ -307,6 +307,7 @@ class Editor extends Component {
render() {
const { challengeFiles, theme } = this.props;
const contents = challengeFiles[this.currentFileKey].contents;
const editorTheme = theme === 'night' ? 'vs-dark-custom' : 'vs-custom';
// TODO: tabs should be dynamically created from the challengeFiles
@ -356,6 +357,7 @@ class Editor extends Component {
onChange={this.onChange}
options={this.options}
theme={editorTheme}
value={contents}
/>
</span>
</Suspense>