From de86a30cc717ab8945e8fdb56604dbbac7f91b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Sun, 16 Sep 2018 15:21:46 +0800 Subject: [PATCH] Fix an error after registration is successful --- package.json | 11 +++++------ src/pages/User/Register.js | 16 +++++++--------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 432b6b05..c6ef1bad 100644 --- a/package.json +++ b/package.json @@ -23,10 +23,10 @@ "prettier": "prettier --write ./src/**/**/**/*" }, "dependencies": { - "@antv/data-set": "^0.9.5", + "@antv/data-set": "^0.9.6", "@babel/runtime": "^7.0.0", - "antd": "^3.9.1", - "bizcharts": "^3.1.10", + "antd": "^3.9.2", + "bizcharts": "^3.2.2", "bizcharts-plugin-slider": "^2.0.3", "classnames": "^2.2.6", "dva": "^2.4.0", @@ -43,13 +43,12 @@ "prop-types": "^15.5.10", "qs": "^6.5.2", "rc-animate": "^2.4.4", - "react": "^16.4.1", + "react": "^16.5.1", "react-container-query": "^0.11.0", "react-copy-to-clipboard": "^5.0.1", "react-document-title": "^2.0.3", - "react-dom": "^16.4.2", + "react-dom": "^16.5.1", "react-fittext": "^1.0.0", - "react-router-config": "^1.0.0-beta.4", "react-router-dom": "^4.3.1" }, "devDependencies": { diff --git a/src/pages/User/Register.js b/src/pages/User/Register.js index b57455c6..1d27ccf7 100644 --- a/src/pages/User/Register.js +++ b/src/pages/User/Register.js @@ -36,17 +36,15 @@ class Register extends Component { }; componentDidUpdate() { - const { form, register, dispatch } = this.props; + const { form, register } = this.props; const account = form.getFieldValue('mail'); if (register.status === 'ok') { - dispatch( - router.push({ - pathname: '/user/register-result', - state: { - account, - }, - }) - ); + router.push({ + pathname: '/user/register-result', + state: { + account, + }, + }); } } -- GitLab