fix: register

This commit is contained in:
Hasta Ragil Saputra 2019-01-29 16:45:20 +07:00
parent 7b4dfa2a66
commit 38eca2d360
3 changed files with 9 additions and 7 deletions

View File

@ -33,4 +33,4 @@ export const styles = theme => ({
background : yellow['500'], background : yellow['500'],
padding : 20 padding : 20
} }
}); });

View File

@ -219,7 +219,7 @@ class RegisterPage extends React.Component {
return this.http.upload(file) return this.http.upload(file)
.then(res => { .then(res => {
this.setState({ this.setState({
[`upload_${key}`]: res.path [`upload_${key}`]: appConfig.apiUrl + res.path.slice(1,res.path.length)
}); });
return res; return res;
}) })
@ -278,7 +278,9 @@ class RegisterPage extends React.Component {
<Grid item cols={12} className={classes.logoContainer}> <Grid item cols={12} className={classes.logoContainer}>
<img src={require('../../../../assets/images/logo_new.png')} className={classes.logo} /> <img src={require('../../../../assets/images/logo_new.png')} className={classes.logo} />
</Grid> </Grid>
<Grid item xs={12} sm={12} md={10} lg={10} className={classes.registerContainer}> <Grid item xs={12} sm={12} md={10} lg={10} className={classes.registerContainer} style={{
alignSelf: 'center'
}}>
<Grid container spacing={24} className={classes.registerPaper}> <Grid container spacing={24} className={classes.registerPaper}>
<Hidden smDown> <Hidden smDown>
<Grid item xs={5}> <Grid item xs={5}>
@ -522,10 +524,9 @@ class RegisterPage extends React.Component {
<div style={{ padding: 5, marginTop: 20 }}> <div style={{ padding: 5, marginTop: 20 }}>
<Button <Button
disabled={!this.state.query.referal}
fullWidth fullWidth
variant="contained" style={{ backgroundColor: '#ffeb3b' }} onClick={this.register}> variant="contained" style={{ backgroundColor: '#ffeb3b' }} onClick={this.register}>
{this.state.isLoading ? <CircularProgress className={classes.progress} /> : (this.state.query.referal ? "Sign Up" : "Please add Referal to continue")} {this.state.isLoading ? <CircularProgress className={classes.progress} /> : "Sign Up"}
</Button> </Button>
</div> </div>
</Paper> </Paper>

View File

@ -10,7 +10,8 @@ export const styles = theme => ({
}, },
gridContainer : { gridContainer : {
flex :1, flex :1,
justifyContent:'center' justifyContent: 'center',
flexDirection: 'column'
}, },
registerContainer: { registerContainer: {
marginTop : 50 marginTop : 50
@ -34,4 +35,4 @@ export const styles = theme => ({
background : yellow['500'], background : yellow['500'],
padding : 20 padding : 20
}, },
}); });