diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2017-01-24 09:45:52 +0100 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-01-24 08:45:52 +0000 |
commit | 1e5354cff3adc49de8a7c4ace5905b1ef914bda2 (patch) | |
tree | ba76b5bbe5c8a55dd525fac5c45bdbdb7678d070 /webapp/components/do_verify_email.jsx | |
parent | 58b3c76c94499e77194d814ebd63ad1e6f3a2d9e (diff) | |
download | chat-1e5354cff3adc49de8a7c4ace5905b1ef914bda2.tar.gz chat-1e5354cff3adc49de8a7c4ace5905b1ef914bda2.tar.bz2 chat-1e5354cff3adc49de8a7c4ace5905b1ef914bda2.zip |
Move instances of Client.verifyEmail() in components to an action (#5166)
Diffstat (limited to 'webapp/components/do_verify_email.jsx')
-rw-r--r-- | webapp/components/do_verify_email.jsx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/webapp/components/do_verify_email.jsx b/webapp/components/do_verify_email.jsx index e0ac3218e..9b6a9ccad 100644 --- a/webapp/components/do_verify_email.jsx +++ b/webapp/components/do_verify_email.jsx @@ -2,11 +2,12 @@ // See License.txt for license information. import {FormattedMessage} from 'react-intl'; -import Client from 'client/web_client.jsx'; import LoadingScreen from './loading_screen.jsx'; import {browserHistory, Link} from 'react-router/es6'; +import {verifyEmail} from 'actions/user_actions.jsx'; + import React from 'react'; export default class DoVerifyEmail extends React.Component { @@ -19,15 +20,11 @@ export default class DoVerifyEmail extends React.Component { }; } componentWillMount() { - const uid = this.props.location.query.uid; - const hid = this.props.location.query.hid; - const email = this.props.location.query.email; - - Client.verifyEmail( - uid, - hid, + verifyEmail( + this.props.location.query.uid, + this.props.location.query.hid, () => { - browserHistory.push('/login?extra=verified&email=' + email); + browserHistory.push('/login?extra=verified&email=' + this.props.location.query.email); }, (err) => { this.setState({verifyStatus: 'failure', serverError: err.message}); |