// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import ErrorBar from 'components/error_bar.jsx'; import {FormattedMessage} from 'react-intl'; import {browserHistory, Link} from 'react-router/es6'; import React from 'react'; export default class CreateTeamController extends React.Component { constructor(props) { super(props); this.submit = this.submit.bind(this); this.updateParent = this.updateParent.bind(this); const state = {}; state.team = {}; state.wizard = 'display_name'; this.state = state; } submit() { // todo fill in } componentDidMount() { browserHistory.push('/create_team/display_name'); } updateParent(state) { this.setState(state); browserHistory.push('/create_team/' + state.wizard); } render() { return (

{global.window.mm_config.SiteName}

{React.cloneElement(this.props.children, { state: this.state, updateParent: this.updateParent })}
); } } CreateTeamController.propTypes = { children: React.PropTypes.node };