|
@@ -1,11 +1,12 @@
|
|
|
import React, { Component } from 'react'
|
|
|
+import { connect } from 'react-redux'
|
|
|
import Base from '../common/Base'
|
|
|
import Typography from 'material-ui/Typography'
|
|
|
import { withStyles } from 'material-ui/styles'
|
|
|
|
|
|
const styles = theme => ({
|
|
|
root: {
|
|
|
- paddingTop: theme.spacing.unit * 8
|
|
|
+ paddingTop: theme.spacing.unit * 15
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -14,14 +15,22 @@ class Welcome extends Component {
|
|
|
*
|
|
|
*/
|
|
|
render() {
|
|
|
- const { classes } = this.props
|
|
|
+ const { username, classes } = this.props
|
|
|
|
|
|
return (
|
|
|
<Base title={this.props.title}>
|
|
|
- <Typography className={classes.root} align='center' variant='headline' color='primary'>Bienvenido al Sistema de Automatización</Typography>
|
|
|
+ <Typography className={classes.root} align='center' variant='display1' color='primary'>Hola {username},<br/>bienvenido al sistema ;)</Typography>
|
|
|
</Base>
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-export default withStyles(styles)(Welcome)
|
|
|
+const mapStateToProps = (state, props) => {
|
|
|
+ return {
|
|
|
+ username: state.auth.username
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+Welcome = withStyles(styles)(Welcome)
|
|
|
+
|
|
|
+export default connect(mapStateToProps)(Welcome)
|