From 59d347de4124907b57a5e23339a81914368ed7a1 Mon Sep 17 00:00:00 2001 From: Delucse <46593742+Delucse@users.noreply.github.com> Date: Tue, 22 Sep 2020 11:56:36 +0200 Subject: [PATCH] fix warnings in tutorial builder --- src/actions/tutorialBuilderActions.js | 1 - src/components/Navbar.js | 2 +- src/components/Tutorial/Builder/BlocklyExample.js | 2 +- src/components/Tutorial/Builder/Builder.js | 2 +- src/components/Tutorial/Builder/Id.js | 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/actions/tutorialBuilderActions.js b/src/actions/tutorialBuilderActions.js index 48d4bc2..9b6ee77 100644 --- a/src/actions/tutorialBuilderActions.js +++ b/src/actions/tutorialBuilderActions.js @@ -243,7 +243,6 @@ export const resetTutorial = () => (dispatch, getState) => { export const readJSON = (json) => (dispatch, getState) => { dispatch(resetTutorial()); - console.log(json.steps.map(() => {return {};})); dispatch({ type: BUILDER_ERROR, payload: { diff --git a/src/components/Navbar.js b/src/components/Navbar.js index 7d925b6..023981a 100644 --- a/src/components/Navbar.js +++ b/src/components/Navbar.js @@ -96,7 +96,7 @@ class Navbar extends Component { - {[{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) => ( diff --git a/src/components/Tutorial/Builder/BlocklyExample.js b/src/components/Tutorial/Builder/BlocklyExample.js index 5b2c5b3..ea8e81b 100644 --- a/src/components/Tutorial/Builder/BlocklyExample.js +++ b/src/components/Tutorial/Builder/BlocklyExample.js @@ -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 (
diff --git a/src/components/Tutorial/Builder/Builder.js b/src/components/Tutorial/Builder/Builder.js index 58fbae3..296e8aa 100644 --- a/src/components/Tutorial/Builder/Builder.js +++ b/src/components/Tutorial/Builder/Builder.js @@ -134,7 +134,7 @@ class Builder extends Component { {this.props.steps.map((step, i) => - + )} {/*submit or reset*/} diff --git a/src/components/Tutorial/Builder/Id.js b/src/components/Tutorial/Builder/Id.js index 964f812..f36bc70 100644 --- a/src/components/Tutorial/Builder/Id.js +++ b/src/components/Tutorial/Builder/Id.js @@ -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={