Router changed to BrowserRouter
Router was causing bug that prevented render when Link was clicked
This commit is contained in:
parent
043943f6a1
commit
4b164b6ed9
|
|
@ -1,16 +1,22 @@
|
|||
import React from 'react';
|
||||
import { Router, Route } from 'react-router-dom';
|
||||
import { BrowserRouter, Route, Switch } from 'react-router-dom';
|
||||
import Navigation from './Navigation';
|
||||
import history from '../history';
|
||||
import Home from './Home';
|
||||
import Github from './Github';
|
||||
|
||||
function App() {
|
||||
const App = (props) => {
|
||||
return (
|
||||
<div className="App">
|
||||
<Router history={history}>
|
||||
<BrowserRouter history={history}>
|
||||
<div>
|
||||
<Navigation />
|
||||
<Switch>
|
||||
<Route path="/" exact component={Home} />
|
||||
</Router>
|
||||
<Route path="/github" component={Github} />
|
||||
</Switch>
|
||||
</div>
|
||||
</BrowserRouter>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue