Redux changes and refactoring

This commit is contained in:
Scott E. Graves
2019-06-07 00:30:59 -05:00
parent 1dc99567f3
commit 31585fc912
6 changed files with 179 additions and 140 deletions

View File

@@ -1,16 +1,23 @@
import Box from '../UI/Box/Box';
import {connect} from 'react-redux';
import React from 'react';
import './DownloadProgress.css';
export default props => {
const mapStateToProps = state => {
return {
DownloadName: state.download.DownloadName,
DownloadProgress: state.download.DownloadProgress,
};
};
export default connect(mapStateToProps)(props => {
return (
<Box dxStyle={{width: '380px', height: 'auto', padding: '5px'}}>
<div style={{width: '100%', height: 'auto'}}>
<h1 style={{width: '100%', textAlign: 'center'}}>{'Downloading ' + props.display}</h1>
<h1 style={{width: '100%', textAlign: 'center'}}>{'Downloading ' + props.DownloadName}</h1>
</div>
<progress max={100.0} id={'download_progress'}
style={{width: '100%'}}
value={props.progress}/>
value={props.DownloadProgress}/>
</Box>);
};
});