From a6ae90ac2a74871331707751e823b4746136ff09 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Thu, 17 Dec 2015 12:44:46 -0500 Subject: Add ability to switch between SSO and email account --- web/react/components/claim/claim_account.jsx | 53 ++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 web/react/components/claim/claim_account.jsx (limited to 'web/react/components/claim/claim_account.jsx') diff --git a/web/react/components/claim/claim_account.jsx b/web/react/components/claim/claim_account.jsx new file mode 100644 index 000000000..f38f558db --- /dev/null +++ b/web/react/components/claim/claim_account.jsx @@ -0,0 +1,53 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import EmailToSSO from './email_to_sso.jsx'; +import SSOToEmail from './sso_to_email.jsx'; + +export default class ClaimAccount extends React.Component { + constructor(props) { + super(props); + + this.state = {}; + } + render() { + let content; + if (this.props.email === '') { + content =

{'No email specified.'}

; + } else if (this.props.currentType === '' && this.props.newType !== '') { + content = ( + + ); + } else { + content = ( + + ); + } + + return ( +
+ {content} +
+ ); + } +} + +ClaimAccount.defaultProps = { +}; +ClaimAccount.propTypes = { + currentType: React.PropTypes.string.isRequired, + newType: React.PropTypes.string.isRequired, + email: React.PropTypes.string.isRequired, + teamName: React.PropTypes.string.isRequired, + teamDisplayName: React.PropTypes.string.isRequired +}; -- cgit v1.2.3-1-g7c22