2016-08-18 11:41:13 +02:00
|
|
|
/**
|
|
|
|
*
|
2017-08-21 15:12:53 +02:00
|
|
|
* App.js
|
2016-08-18 11:41:13 +02:00
|
|
|
*
|
|
|
|
* This component is the skeleton around the actual pages, and should only
|
|
|
|
* contain code that should be seen on all pages. (e.g. navigation bar)
|
2016-08-18 11:47:26 +02:00
|
|
|
*
|
|
|
|
* NOTE: while this component should technically be a stateless functional
|
|
|
|
* component (SFC), hot reloading does not currently support SFCs. If hot
|
|
|
|
* reloading is not a neccessity for you then you can refactor it and remove
|
|
|
|
* the linting exception.
|
2016-08-18 11:41:13 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
2017-08-21 15:12:53 +02:00
|
|
|
import { Switch, Route } from 'react-router-dom';
|
2017-08-18 14:17:15 +02:00
|
|
|
|
2017-08-21 15:12:53 +02:00
|
|
|
import AdminPage from 'containers/AdminPage';
|
|
|
|
import NotFoundPage from 'containers/NotFoundPage';
|
|
|
|
|
|
|
|
import NotificationProvider from 'containers/NotificationProvider';
|
2017-08-18 14:17:15 +02:00
|
|
|
|
2016-08-24 15:09:42 +02:00
|
|
|
import '../../styles/main.scss';
|
2017-09-19 19:04:39 +02:00
|
|
|
|
2016-08-24 15:09:42 +02:00
|
|
|
import styles from './styles.scss';
|
2016-08-18 11:41:13 +02:00
|
|
|
|
2016-08-18 14:22:12 +02:00
|
|
|
export class App extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
2016-08-18 11:47:26 +02:00
|
|
|
render() {
|
|
|
|
return (
|
2016-09-30 18:25:04 +02:00
|
|
|
<div>
|
2017-08-21 15:12:53 +02:00
|
|
|
<NotificationProvider />
|
2016-09-30 18:25:04 +02:00
|
|
|
<div className={styles.container}>
|
2017-08-21 15:12:53 +02:00
|
|
|
<Switch>
|
2017-08-22 10:51:53 +02:00
|
|
|
<Route path="/" component={AdminPage} />
|
2017-08-21 15:12:53 +02:00
|
|
|
<Route path="" component={NotFoundPage} />
|
|
|
|
</Switch>
|
2016-09-30 18:25:04 +02:00
|
|
|
</div>
|
2016-08-18 11:47:26 +02:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2016-08-18 14:22:12 +02:00
|
|
|
|
2017-04-11 15:38:15 +02:00
|
|
|
App.contextTypes = {
|
2017-08-18 17:51:10 +02:00
|
|
|
router: React.PropTypes.object.isRequired,
|
2017-04-11 15:38:15 +02:00
|
|
|
};
|
|
|
|
|
2017-08-21 15:12:53 +02:00
|
|
|
App.propTypes = {};
|
2016-08-18 14:22:12 +02:00
|
|
|
|
2017-08-21 15:12:53 +02:00
|
|
|
export default App;
|