|
|
@@ -1,7 +1,8 @@
|
|
|
import React, {lazy, Suspense} from 'react';
|
|
|
-import {BrowserRouter, Route, Link, Switch} from 'react-router-dom';
|
|
|
+import {Router, Route, Link, Switch} from 'react-router-dom';
|
|
|
import {hot} from 'react-hot-loader/root';
|
|
|
|
|
|
+import history from './history';
|
|
|
import ApplicationLayout from './components/layout/ApplicationLayout';
|
|
|
|
|
|
const Pokemon = lazy((): Promise<any> => import('./components/pages/Pokemon'));
|
|
|
@@ -12,7 +13,7 @@ import './assets/stylesheets/app.scss';
|
|
|
|
|
|
function App(): React.ReactElement {
|
|
|
return (
|
|
|
- <BrowserRouter>
|
|
|
+ <Router history={history}>
|
|
|
<ApplicationLayout>
|
|
|
<Suspense fallback={<div>Loading...</div>}>
|
|
|
<Switch>
|
|
|
@@ -27,7 +28,7 @@ function App(): React.ReactElement {
|
|
|
</p>
|
|
|
</Suspense>
|
|
|
</ApplicationLayout>
|
|
|
- </BrowserRouter>
|
|
|
+ </Router>
|
|
|
);
|
|
|
}
|
|
|
|