This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Route, Switch } from 'react-router'; | |
import { Link } from 'react-router-dom'; | |
import React from 'react'; | |
import routes from './routes'; | |
const Layout = () => | |
<div> | |
<nav> | |
<ul> | |
<li> | |
<Link to="/">Home</Link> | |
</li> | |
<li> | |
<Link to="/another">Another page</Link> | |
</li> | |
</ul> | |
</nav> | |
<Switch> | |
{routes.map(route => <Route key={route.name} {...route} />)} | |
</Switch> | |
</div>; | |
export default Layout; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment