2015-07-17 15:02:44 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import React from 'react';
|
2015-10-01 11:16:38 +02:00
|
|
|
import { History } from 'react-router';
|
2015-07-17 15:02:44 +02:00
|
|
|
|
2015-10-16 13:10:18 +02:00
|
|
|
import AscribeSpinner from './ascribe_spinner';
|
|
|
|
|
2015-07-17 15:02:44 +02:00
|
|
|
import UserActions from '../actions/user_actions';
|
|
|
|
|
2015-10-16 13:10:18 +02:00
|
|
|
import { getLangText } from '../utils/lang_utils';
|
2015-10-13 16:42:40 +02:00
|
|
|
import { setDocumentTitle } from '../utils/dom_utils';
|
2015-10-16 13:10:18 +02:00
|
|
|
|
|
|
|
|
2015-07-17 15:02:44 +02:00
|
|
|
let LogoutContainer = React.createClass({
|
2016-01-11 12:54:15 +01:00
|
|
|
propTypes: {
|
|
|
|
// Provided from AscribeApp
|
|
|
|
currentUser: React.PropTypes.object,
|
|
|
|
whitelabel: React.PropTypes.object,
|
|
|
|
|
2016-01-11 16:26:36 +01:00
|
|
|
// Provided from router
|
2016-01-11 12:54:15 +01:00
|
|
|
location: React.PropTypes.object
|
|
|
|
},
|
|
|
|
|
2015-10-01 11:16:38 +02:00
|
|
|
mixins: [History],
|
2015-07-17 15:02:44 +02:00
|
|
|
|
|
|
|
componentDidMount() {
|
2015-10-07 09:39:30 +02:00
|
|
|
UserActions.logoutCurrentUser();
|
2015-07-17 15:02:44 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
render() {
|
2015-10-13 16:42:40 +02:00
|
|
|
setDocumentTitle(getLangText('Log out'));
|
|
|
|
|
2015-10-16 13:10:18 +02:00
|
|
|
return (
|
|
|
|
<div className="ascribe-loading-position">
|
|
|
|
<AscribeSpinner color='dark-blue' size='lg'/>
|
|
|
|
<h3 className="text-center">
|
|
|
|
{getLangText('Just a sec, we\'re logging you out...')}
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
);
|
2015-07-17 15:02:44 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
export default LogoutContainer;
|