mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-15 21:04:46 +01:00
26 lines
597 B
JavaScript
26 lines
597 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 && res.result === true){
|
|
this.props.history.push('/files');
|
|
}else{
|
|
this.props.history.push('/login');
|
|
}
|
|
});
|
|
}
|
|
render() {
|
|
return (
|
|
<div> <Loader /> </div>
|
|
);
|
|
}
|
|
}
|