diff options
Diffstat (limited to 'webapp/components/claim/components/email_to_oauth.jsx')
-rw-r--r-- | webapp/components/claim/components/email_to_oauth.jsx | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/webapp/components/claim/components/email_to_oauth.jsx b/webapp/components/claim/components/email_to_oauth.jsx index f4376067a..1fd284bed 100644 --- a/webapp/components/claim/components/email_to_oauth.jsx +++ b/webapp/components/claim/components/email_to_oauth.jsx @@ -2,12 +2,11 @@ // See License.txt for license information. import * as Utils from 'utils/utils.jsx'; -import * as Client from 'utils/client.jsx'; +import Client from 'utils/web_client.jsx'; import React from 'react'; import ReactDOM from 'react-dom'; import {FormattedMessage} from 'react-intl'; -import {browserHistory} from 'react-router'; export default class EmailToOAuth extends React.Component { constructor(props) { @@ -31,16 +30,13 @@ export default class EmailToOAuth extends React.Component { state.error = null; this.setState(state); - var postData = {}; - postData.password = password; - postData.email = this.props.email; - postData.team_name = this.props.teamName; - postData.service = this.props.newType; - - Client.emailToOAuth(postData, + Client.emailToOAuth( + this.props.email, + password, + this.props.newType, (data) => { if (data.follow_link) { - browserHistory.push(data.follow_link); + window.location.href = data.follow_link; } }, (error) => { @@ -94,9 +90,8 @@ export default class EmailToOAuth extends React.Component { <p> <FormattedMessage id='claim.email_to_oauth.enterPwd' - defaultMessage='Enter the password for your {team} {site} account' + defaultMessage='Enter the password for your {site} account' values={{ - team: this.props.teamDisplayName, site: global.window.mm_config.SiteName }} /> @@ -134,7 +129,5 @@ EmailToOAuth.defaultProps = { }; EmailToOAuth.propTypes = { newType: React.PropTypes.string, - email: React.PropTypes.string, - teamName: React.PropTypes.string, - teamDisplayName: React.PropTypes.string + email: React.PropTypes.string }; |