mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-30 09:37:55 +08:00
26 lines
551 B
JavaScript
26 lines
551 B
JavaScript
import React from 'react';
|
|
import { Session, invalidate } from '../data';
|
|
import { Loader } from '../utilities';
|
|
|
|
export class LogoutPage extends React.Component {
|
|
constructor(props){
|
|
super(props);
|
|
}
|
|
|
|
componentDidMount(){
|
|
invalidate();
|
|
Session.logout()
|
|
.then((res) => {
|
|
this.props.history.push('/');
|
|
})
|
|
.catch((res) => {
|
|
console.warn(res)
|
|
})
|
|
}
|
|
render() {
|
|
return (
|
|
<div> <Loader /> </div>
|
|
);
|
|
}
|
|
}
|