import {
HashRouter,
Switch,
Route,
Redirect,
NavLink
} from 'react-router-dom'
function App () {
return (
<HashRouter>
<Navigation />
<Switch>
<Route
path="/home"
component={() => <div>Home page</div>}
exact />
<Route
path="/admin"
component={() => <div>Admin page</div>} />
<Route
path="/not-found"
component={() => <div>Page not found</div>} />
<Redirect
from="/"
to="/home"
exact />
<Redirect
from="*"
to="/not-found" />
</Switch>
</HashRouter>
)
}
function Navigation () {
return (
<div className="nav">
<NavLink to="/" activeClassName="active" exact>