2019-06-10 01:29:10 +01:00
|
|
|
import * as React from 'react';
|
|
|
|
import { hot } from 'react-hot-loader/root';
|
2019-06-10 03:26:20 +01:00
|
|
|
import { BrowserRouter as Router, Route } from 'react-router-dom';
|
|
|
|
import AuthenticationRouter from '@/routers/AuthenticationRouter';
|
2019-06-22 23:23:02 +01:00
|
|
|
import AccountRouter from '@/routers/AccountRouter';
|
|
|
|
import ServerOverviewContainer from '@/components/ServerOverviewContainer';
|
2019-06-23 00:45:51 +01:00
|
|
|
import { StoreProvider } from 'easy-peasy';
|
|
|
|
import { store } from '@/state';
|
2019-06-10 01:29:10 +01:00
|
|
|
|
|
|
|
class App extends React.PureComponent {
|
2019-06-23 00:45:51 +01:00
|
|
|
componentDidMount () {
|
|
|
|
|
2019-06-12 07:12:03 +01:00
|
|
|
}
|
|
|
|
|
2019-06-23 00:45:51 +01:00
|
|
|
render () {
|
2019-06-12 07:12:03 +01:00
|
|
|
return (
|
2019-06-23 00:45:51 +01:00
|
|
|
<StoreProvider store={store}>
|
|
|
|
<Router basename={'/'}>
|
|
|
|
<div className={'mx-auto px-10 w-auto'} style={{ maxWidth: '1000px' }}>
|
|
|
|
<Route exact path="/" component={ServerOverviewContainer}/>
|
|
|
|
<Route path="/auth" component={AuthenticationRouter}/>
|
|
|
|
<Route path="/account" component={AccountRouter}/>
|
|
|
|
</div>
|
|
|
|
</Router>
|
|
|
|
</StoreProvider>
|
2019-06-10 01:29:10 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default hot(App);
|