Refactoring

This commit is contained in:
2019-10-23 11:18:18 -05:00
parent 032d12aee6
commit ce06bc27a8
9 changed files with 134 additions and 129 deletions

View File

@@ -11,6 +11,7 @@ import RootElem from '../UI/RootElem/RootElem';
import {displayConfiguration, removeRemoteMount, setProviderState} from '../../redux/actions/mount_actions';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import { faTrashAlt} from '@fortawesome/free-solid-svg-icons';
import CheckBox from '../UI/CheckBox/CheckBox';
const mapStateToProps = (state, ownProps) => {
return {
@@ -125,13 +126,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
colSpan={28}
row={secondRow}
rowSpan={7}>
<label className='CheckBoxOwner'>Auto-mount
<input checked={props.PState.AutoMount}
id={'checkbox_am_' + props.provider}
onChange={handleAutoMountChanged}
type='checkbox'/>
<span className='CheckMark'/>
</label>
<CheckBox changed={handleAutoMountChanged}
checked={props.PState.AutoMount} label={'Auto-mount'}/>
</RootElem>
);
@@ -140,13 +136,9 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
colSpan={24}
row={secondRow}
rowSpan={7}>
<label className='CheckBoxOwner'>Restart
<input checked={props.PState.AutoRestart}
id={'checkbox_ar_' + props.provider}
onChange={handleAutoRestartChanged}
type='checkbox'/>
<span className='CheckMark'/>
</label>
<CheckBox changed={handleAutoRestartChanged}
checked={props.PState.AutoRestart}
label={'Restart'}/>
</RootElem>
);