diff --git a/src/components/CodeViewer.js b/src/components/CodeViewer.js index e4f74da..35a972a 100644 --- a/src/components/CodeViewer.js +++ b/src/components/CodeViewer.js @@ -1,4 +1,4 @@ -import React, {Component} from 'react'; +import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; @@ -56,7 +56,7 @@ const AccordionDetails = withStyles((theme) => ({ class CodeViewer extends Component { - constructor(props){ + constructor(props) { super(props); this.state = { expanded: true, @@ -67,12 +67,12 @@ class CodeViewer extends Component { componentDidMount() { Prism.highlightAll(); - this.setState({componentHeight: this.myDiv.current.offsetHeight+'px'}); + this.setState({ componentHeight: this.myDiv.current.offsetHeight + 'px' }); } componentDidUpdate(props, state) { - if(this.myDiv.current && this.myDiv.current.offsetHeight+'px' !== this.state.componentHeight){ - this.setState({componentHeight: this.myDiv.current.offsetHeight+'px'}); + if (this.myDiv.current && this.myDiv.current.offsetHeight + 'px' !== this.state.componentHeight) { + this.setState({ componentHeight: this.myDiv.current.offsetHeight + 'px' }); } Prism.highlightAll(); } @@ -85,19 +85,19 @@ class CodeViewer extends Component { var curlyBrackets = '{ }'; var unequal = '<>'; return ( - + - {curlyBrackets} -
Arduino Quellcode
+ {curlyBrackets} +
Arduino Quellcode
- -
+          
+            
               
                 {this.props.arduino}
               
@@ -106,16 +106,16 @@ class CodeViewer extends Component {
         
         
           
-            {unequal}
-            
XML Blöcke
+ {unequal} +
XML Blöcke
- -
+          
+            
               
                 {`${this.props.xml}`}
               
diff --git a/src/components/Home.js b/src/components/Home.js
index fc0f35d..86deb9a 100644
--- a/src/components/Home.js
+++ b/src/components/Home.js
@@ -56,7 +56,7 @@ class Home extends Component {
     Blockly.svgResize(workspace);
   }
 
-  componentWillUnmount(){
+  componentWillUnmount() {
     this.props.clearStats();
     this.props.workspaceName(null);
   }
@@ -73,21 +73,21 @@ class Home extends Component {
   render() {
     return (
       
-
-
+
+
this.onChange()} > - + - + {this.state.codeOn ? diff --git a/src/components/Tutorial/Assessment.js b/src/components/Tutorial/Assessment.js index 2756ba2..3cd546b 100644 --- a/src/components/Tutorial/Assessment.js +++ b/src/components/Tutorial/Assessment.js @@ -14,13 +14,13 @@ import Typography from '@material-ui/core/Typography'; class Assessment extends Component { - componentDidMount(){ + componentDidMount() { // alert(this.props.name); this.props.workspaceName(this.props.name); } - componentDidUpdate(props){ - if(props.name !== this.props.name){ + componentDidUpdate(props) { + if (props.name !== this.props.name) { // alert(this.props.name); this.props.workspaceName(this.props.name); } @@ -34,23 +34,23 @@ class Assessment extends Component { var statusTask = status.tasks[taskIndex]; return ( -
- {currentTask.headline} -
- +
+ {currentTask.headline} +
+ - - + + Arbeitsauftrag {currentTask.text} -
+