fix warnings in tutorial builder
This commit is contained in:
		
							parent
							
								
									9df7de05f4
								
							
						
					
					
						commit
						59d347de41
					
				| @ -243,7 +243,6 @@ export const resetTutorial = () => (dispatch, getState) => { | |||||||
| 
 | 
 | ||||||
| export const readJSON = (json) => (dispatch, getState) => { | export const readJSON = (json) => (dispatch, getState) => { | ||||||
|   dispatch(resetTutorial()); |   dispatch(resetTutorial()); | ||||||
|   console.log(json.steps.map(() => {return {};})); |  | ||||||
|   dispatch({ |   dispatch({ | ||||||
|     type: BUILDER_ERROR, |     type: BUILDER_ERROR, | ||||||
|     payload: { |     payload: { | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ class Navbar extends Component { | |||||||
|             </div> |             </div> | ||||||
|           </div> |           </div> | ||||||
|           <List> |           <List> | ||||||
|             {[{text: 'Tutorials', icon: faChalkboardTeacher, link: "/tutorial"}, {text: 'Tutorial-Builder', icon: faFolderPlus, link: "/tutorial/builder"}, {text: 'Einstellungen', icon: faCog}].map((item, index) => ( |             {[{text: 'Tutorials', icon: faChalkboardTeacher, link: "/tutorial"}, {text: 'Tutorial-Builder', icon: faFolderPlus, link: "/tutorial/builder"}, {text: 'Einstellungen', icon: faCog, link: "/settings"}].map((item, index) => ( | ||||||
|               <Link to={item.link} key={index} style={{textDecoration: 'none', color: 'inherit'}}> |               <Link to={item.link} key={index} style={{textDecoration: 'none', color: 'inherit'}}> | ||||||
|                 <ListItem button onClick={this.toggleDrawer}> |                 <ListItem button onClick={this.toggleDrawer}> | ||||||
|                   <ListItemIcon><FontAwesomeIcon icon={item.icon}/></ListItemIcon> |                   <ListItemIcon><FontAwesomeIcon icon={item.icon}/></ListItemIcon> | ||||||
|  | |||||||
| @ -108,7 +108,7 @@ class BlocklyExample extends Component { | |||||||
|           } |           } | ||||||
|           catch(err){ |           catch(err){ | ||||||
|             initialXml = null; |             initialXml = null; | ||||||
|             this.props.setError(this.props.index, 'xml'); |             // this.props.setError(this.props.index, 'xml');
 | ||||||
|           } |           } | ||||||
|           return ( |           return ( | ||||||
|             <div style={{marginTop: '10px'}}> |             <div style={{marginTop: '10px'}}> | ||||||
|  | |||||||
| @ -134,7 +134,7 @@ class Builder extends Component { | |||||||
|         <Textfield value={this.props.title} property={'title'} label={'Titel'} error={this.props.error.title}/> |         <Textfield value={this.props.title} property={'title'} label={'Titel'} error={this.props.error.title}/> | ||||||
| 
 | 
 | ||||||
|         {this.props.steps.map((step, i) => |         {this.props.steps.map((step, i) => | ||||||
|           <Step step={step} index={i} /> |           <Step step={step} index={i} key={i}/> | ||||||
|         )} |         )} | ||||||
| 
 | 
 | ||||||
|         {/*submit or reset*/} |         {/*submit or reset*/} | ||||||
|  | |||||||
| @ -36,7 +36,7 @@ class Id extends Component { | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|       this.props.tutorialId(value); |       this.props.tutorialId(value.toString()); | ||||||
|       this.props.setError(undefined,'id'); |       this.props.setError(undefined,'id'); | ||||||
|     } |     } | ||||||
|   }; |   }; | ||||||
| @ -81,7 +81,7 @@ class Id extends Component { | |||||||
|           endAdornment={ |           endAdornment={ | ||||||
|             <div style={{display: 'flex'}}> |             <div style={{display: 'flex'}}> | ||||||
|               <Button |               <Button | ||||||
|                 disabled={this.props.value === 1 || !this.props.value} |                 disabled={this.props.value === 1 || !Number.isInteger(this.props.value)} | ||||||
|                 onClick={() => this.handleCounter(-1)} |                 onClick={() => this.handleCounter(-1)} | ||||||
|                 variant='contained' |                 variant='contained' | ||||||
|                 color='primary' |                 color='primary' | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user