update: redirect after register

This commit is contained in:
ahmadzuhdi 2019-01-29 17:27:18 +07:00
parent 65cb2b7342
commit c05011938c
2 changed files with 6 additions and 3 deletions

View File

@ -17,7 +17,8 @@
"dev:parcel": "node scripts/dev-parcel.js", "dev:parcel": "node scripts/dev-parcel.js",
"deploy": "rsync -chavzP -e \"ssh -p 2222\" --stats dist/ root@209.58.165.19:/home/apps/giift/giift-customer-btn", "deploy": "rsync -chavzP -e \"ssh -p 2222\" --stats dist/ root@209.58.165.19:/home/apps/giift/giift-customer-btn",
"deploy:giift": "rsync -chavzP -e \"ssh -p 2222\" --stats dist/ root@209.58.165.19:/home/apps/giift/giift-customer", "deploy:giift": "rsync -chavzP -e \"ssh -p 2222\" --stats dist/ root@209.58.165.19:/home/apps/giift/giift-customer",
"dev2:parcel": "node scripts/link-assets.js; parcel public/index.parcel.html --out-file index.html --global $" "dev2:parcel": "node scripts/link-assets.js; parcel public/index.parcel.html --out-file index.html --global $",
"build:deploy": "npm run build:parcel:prod && npm run deploy"
}, },
"author": "Asacreative", "author": "Asacreative",
"repository": { "repository": {

View File

@ -22,6 +22,7 @@ import { Upload, Icon, message } from 'antd';
import AutoComplete from './../../components/AutoComplete'; import AutoComplete from './../../components/AutoComplete';
import {appConfig} from "../../config/app"; import {appConfig} from "../../config/app";
import {LINKS} from "../../routes";
// const province = require("./../../../../assets/data/province.json"); // const province = require("./../../../../assets/data/province.json");
// const city = require("./../../../../assets/data/city.json"); // const city = require("./../../../../assets/data/city.json");
@ -156,10 +157,11 @@ class RegisterPage extends React.Component {
additional_data: {} additional_data: {}
}; };
this.authStore.register(data).then(res => { this.authStore.register(data).then(res => {
message.success("Please check your email to confirm your account");
setTimeout(() => { setTimeout(() => {
this.setState({ isLoading: false }); this.setState({ isLoading: false });
message.success("Please check your email to confirm your account"); this.props.history.push(LINKS.LOGIN);
}, 1000); }, 250);
}).catch(err => { }).catch(err => {
this.setState({ isLoading: false }); this.setState({ isLoading: false });