diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-05-26 09:46:18 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-05-26 09:46:18 -0400 |
commit | 6fecfcc7ca9f7cf29b4cf87ebeb63b09df70a8c7 (patch) | |
tree | d0d8d9833156f2a21f37a1ff746acd18342d3ebe /webapp/components/claim/claim_controller.jsx | |
parent | 9c0caaa76505d4d473f987298acace4f198eb447 (diff) | |
download | chat-6fecfcc7ca9f7cf29b4cf87ebeb63b09df70a8c7.tar.gz chat-6fecfcc7ca9f7cf29b4cf87ebeb63b09df70a8c7.tar.bz2 chat-6fecfcc7ca9f7cf29b4cf87ebeb63b09df70a8c7.zip |
Refactor login, claim and create_team into views and add actions (#3110)
Diffstat (limited to 'webapp/components/claim/claim_controller.jsx')
-rw-r--r-- | webapp/components/claim/claim_controller.jsx | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/webapp/components/claim/claim_controller.jsx b/webapp/components/claim/claim_controller.jsx new file mode 100644 index 000000000..dbb944bb9 --- /dev/null +++ b/webapp/components/claim/claim_controller.jsx @@ -0,0 +1,59 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import React from 'react'; +import {FormattedMessage} from 'react-intl'; +import {Link} from 'react-router'; + +import logoImage from 'images/logo.png'; + +export default class ClaimController extends React.Component { + constructor(props) { + super(props); + + this.state = {}; + } + componentWillMount() { + this.setState({ + email: this.props.location.query.email, + newType: this.props.location.query.new_type, + oldType: this.props.location.query.old_type + }); + } + render() { + return ( + <div> + <div className='signup-header'> + <Link to='/'> + <span className='fa fa-chevron-left'/> + <FormattedMessage + id='web.header.back' + /> + </Link> + </div> + <div className='col-sm-12'> + <div className='signup-team__container'> + <img + className='signup-team-logo' + src={logoImage} + /> + <div id='claim'> + {React.cloneElement(this.props.children, { + currentType: this.state.oldType, + newType: this.state.newType, + email: this.state.email + })} + </div> + </div> + </div> + </div> + ); + } +} + +ClaimController.defaultProps = { +}; +ClaimController.propTypes = { + location: React.PropTypes.object.isRequired, + children: React.PropTypes.node +}; |