Redux changes and refactoring
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import './MountItem.css';
|
||||
import {connect} from "react-redux";
|
||||
import DropDown from '../UI/DropDown/DropDown';
|
||||
import Button from '../UI/Button/Button';
|
||||
import Loader from 'react-loader-spinner';
|
||||
@@ -8,7 +9,13 @@ import Grid from '../UI/Grid/Grid';
|
||||
import configureImage from '../../assets/images/configure.png';
|
||||
import RootElem from '../../hoc/RootElem/RootElem';
|
||||
|
||||
export default props => {
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
Platform: state.common.Platform,
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(props => {
|
||||
let configButton = null;
|
||||
let secondRow = 6;
|
||||
if (props.allowConfig) {
|
||||
@@ -27,7 +34,7 @@ export default props => {
|
||||
|
||||
let inputColumnSpan;
|
||||
let inputControls = null;
|
||||
if (props.platform === 'win32') {
|
||||
if (props.Platform === 'win32') {
|
||||
inputColumnSpan = 20;
|
||||
inputControls = <DropDown changed={props.changed}
|
||||
colSpan={inputColumnSpan}
|
||||
@@ -121,4 +128,4 @@ export default props => {
|
||||
{autoRestartControl}
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user