filestash/client/pages/homepage.js

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>
);
}
}