This is the main router for index page, routes to searchRequest and admin pages.

This commit is contained in:
2017-10-06 11:57:22 +02:00
parent 1633be1276
commit 5b110b9d82

View File

@@ -0,0 +1,21 @@
import React from 'react';
import { HashRouter as Router, Route, Switch} from 'react-router-dom';
import { createBrowserHistory } from 'history';
import SearchRequest from './SearchRequest.jsx';
import Admin from './Admin.jsx';
import NotFound from './NotFound.js';
export const history = createBrowserHistory();
const Main = () => (
<Router>
<Switch>
<Route exact path='/' component={SearchRequest} />
<Route path='/admin' component={Admin} />
<Route component={NotFound} />
</Switch>
</Router>
)
export default Main