fix warnings in tutorial builder

This commit is contained in:
Delucse
2020-09-22 11:56:36 +02:00
parent 9df7de05f4
commit 59d347de41
5 changed files with 5 additions and 6 deletions
@@ -108,7 +108,7 @@ class BlocklyExample extends Component {
}
catch(err){
initialXml = null;
this.props.setError(this.props.index, 'xml');
// this.props.setError(this.props.index, 'xml');
}
return (
<div style={{marginTop: '10px'}}>
+1 -1
View File
@@ -134,7 +134,7 @@ class Builder extends Component {
<Textfield value={this.props.title} property={'title'} label={'Titel'} error={this.props.error.title}/>
{this.props.steps.map((step, i) =>
<Step step={step} index={i} />
<Step step={step} index={i} key={i}/>
)}
{/*submit or reset*/}
+2 -2
View File
@@ -36,7 +36,7 @@ class Id extends Component {
}
}
else {
this.props.tutorialId(value);
this.props.tutorialId(value.toString());
this.props.setError(undefined,'id');
}
};
@@ -81,7 +81,7 @@ class Id extends Component {
endAdornment={
<div style={{display: 'flex'}}>
<Button
disabled={this.props.value === 1 || !this.props.value}
disabled={this.props.value === 1 || !Number.isInteger(this.props.value)}
onClick={() => this.handleCounter(-1)}
variant='contained'
color='primary'