Files
mattermost/web/react/components/password_reset.jsx

48 lines
1.2 KiB
React
Raw Normal View History

2015-06-14 23:53:32 -08:00
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
// See License.txt for license information.
var PasswordResetSendLink = require('./password_reset_send_link.jsx');
var PasswordResetForm = require('./password_reset_form.jsx');
2015-06-14 23:53:32 -08:00
export default class PasswordReset extends React.Component {
constructor(props) {
super(props);
2015-06-14 23:53:32 -08:00
this.state = {};
2015-06-14 23:53:32 -08:00
}
render() {
if (this.props.isReset === 'false') {
2015-06-14 23:53:32 -08:00
return (
<PasswordResetSendLink
teamDisplayName={this.props.teamDisplayName}
2015-06-14 23:53:32 -08:00
teamName={this.props.teamName}
/>
);
}
return (
<PasswordResetForm
teamDisplayName={this.props.teamDisplayName}
teamName={this.props.teamName}
hash={this.props.hash}
data={this.props.data}
/>
);
2015-06-14 23:53:32 -08:00
}
}
PasswordReset.defaultProps = {
isReset: '',
teamName: '',
teamDisplayName: '',
hash: '',
data: ''
};
PasswordReset.propTypes = {
isReset: React.PropTypes.string,
teamName: React.PropTypes.string,
teamDisplayName: React.PropTypes.string,
hash: React.PropTypes.string,
data: React.PropTypes.string
};