1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-29 00:58:03 +02:00
onion/js/components/password_reset_container.js

30 lines
911 B
JavaScript
Raw Normal View History

2015-06-15 16:56:17 +02:00
'use strict';
import React from 'react';
import Router from 'react-router';
import PasswordResetForm from './ascribe_forms/form_password_reset';
import GlobalNotificationModel from '../models/global_notification_model';
import GlobalNotificationActions from '../actions/global_notification_actions';
let PasswordResetContainer = React.createClass({
mixins: [Router.Navigation],
handleSuccess(){
this.transitionTo('pieces');
let notification = new GlobalNotificationModel('password succesfully updated', 'success', 10000);
GlobalNotificationActions.appendGlobalNotification(notification);
},
render() {
return (
<PasswordResetForm
email={this.props.query.email}
token={this.props.query.token}
handleSuccess={this.handleSuccess}
/>
);
}
});
export default PasswordResetContainer;