cleanup (structure): update code structure

This commit is contained in:
Mickael KERJEAN
2017-06-27 17:50:27 +10:00
parent 58de01a16c
commit 0b5137846c
49 changed files with 4 additions and 7 deletions

28
client/pages/homepage.js Normal file
View File

@ -0,0 +1,28 @@
import React from 'react';
import { Session } from '../data';
import { Loader } from '../utilities';
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>
);
}
}