diff --git a/src/components/DeviceSelection.js b/src/components/DeviceSelection.js index 4f0768f..9c5ac6c 100644 --- a/src/components/DeviceSelection.js +++ b/src/components/DeviceSelection.js @@ -29,8 +29,8 @@ class DeviceSeclection extends Component { constructor(props) { super(props); this.state = { - open: true, - selectedBoard : "", + open: this.props.selectedBoard !== "" ? false : true, + selectedBoard : this.props.selectedBoard, saveSettings: false, }; @@ -42,13 +42,6 @@ class DeviceSeclection extends Component { }; - onChange = (e) => { - if (e.target.checked) { - this.setState({ saveSettings: true}); - } else { - this.setState({ saveSettings: false}); - } - }; onclick = (e, value) => { console.log(e, value) @@ -121,21 +114,6 @@ class DeviceSeclection extends Component { - {/* this.onChange(e)} - name="dialog" - color="primary" - /> - } - label={Blockly.Msg.deviceselection_keep_selection} - /> */} {Blockly.Msg.deviceselection_footnote} Arduino UNO {Blockly.Msg.deviceselection_footnote_02} senseBox MCU diff --git a/src/components/Home.js b/src/components/Home.js index 13a4661..55c41a7 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -187,6 +187,7 @@ class Home extends Component { ) : null} + {/* */} {this.props.platform ? ( diff --git a/src/reducers/boardReducer.js b/src/reducers/boardReducer.js index b2c157f..ca154cd 100644 --- a/src/reducers/boardReducer.js +++ b/src/reducers/boardReducer.js @@ -1,10 +1,7 @@ import { BOARD } from '../actions/types'; const initialValue = () => { - if (window.localStorage.getItem("board")) { - return window.localStorage.getItem("board"); - } - return "bla"; + return ""; }; const initialState = {