mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
29 lines
661 B
JavaScript
29 lines
661 B
JavaScript
import React from 'react';
|
|
|
|
import { Session } from '../model/';
|
|
import { Loader } from '../components/';
|
|
|
|
export class HomePage extends React.Component {
|
|
constructor(props){
|
|
super(props);
|
|
}
|
|
|
|
componentDidMount(){
|
|
Session.isLogged()
|
|
.then((res) => {
|
|
if(res === true){
|
|
this.props.history.push('/files');
|
|
}else{
|
|
this.props.history.push('/login');
|
|
}
|
|
})
|
|
.catch((res) => {
|
|
console.warn(res)
|
|
})
|
|
}
|
|
render() {
|
|
return (
|
|
<div> <Loader /> </div>
|
|
);
|
|
}
|
|
}
|