From 6fecfcc7ca9f7cf29b4cf87ebeb63b09df70a8c7 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 26 May 2016 09:46:18 -0400 Subject: Refactor login, claim and create_team into views and add actions (#3110) --- webapp/components/claim/claim.jsx | 59 ---------------------------- webapp/components/claim/claim_controller.jsx | 59 ++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 webapp/components/claim/claim.jsx create mode 100644 webapp/components/claim/claim_controller.jsx (limited to 'webapp/components/claim') diff --git a/webapp/components/claim/claim.jsx b/webapp/components/claim/claim.jsx deleted file mode 100644 index 0197e1677..000000000 --- a/webapp/components/claim/claim.jsx +++ /dev/null @@ -1,59 +0,0 @@ -// 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 Claim 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 ( -
-
- - - - -
-
-
- -
- {React.cloneElement(this.props.children, { - currentType: this.state.oldType, - newType: this.state.newType, - email: this.state.email - })} -
-
-
-
- ); - } -} - -Claim.defaultProps = { -}; -Claim.propTypes = { - location: React.PropTypes.object.isRequired, - children: React.PropTypes.node -}; 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 ( +
+
+ + + + +
+
+
+ +
+ {React.cloneElement(this.props.children, { + currentType: this.state.oldType, + newType: this.state.newType, + email: this.state.email + })} +
+
+
+
+ ); + } +} + +ClaimController.defaultProps = { +}; +ClaimController.propTypes = { + location: React.PropTypes.object.isRequired, + children: React.PropTypes.node +}; -- cgit v1.2.3-1-g7c22