Skip to content

Commit

Permalink
Refactor navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Rumiński committed Nov 16, 2018
1 parent d1ff2ad commit 0cb8414
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions src/presentational/navigation.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ import React from "react";
import { Link } from "react-router";
import "../../node_modules/bootstrap/dist/css/bootstrap.css";
import "../../node_modules/bootstrap/dist/css/bootstrap-theme.css";
const linksArr = [
{
url: "/countries",
name: "Countries"
},
{
url: "/continents",
name: "Continents"
},
{
url: "/contact",
name: "Contact"
}
];

const Navigation = props => (
<div>
Expand All @@ -14,15 +28,11 @@ const Navigation = props => (
</div>
<div className="collapse navbar-collapse">
<ul className="nav navbar-nav">
<li>
<Link to="/countries">Countries</Link>
</li>
<li>
<Link to="/continents">Continents</Link>
</li>
<li>
<Link to="/contact">Contact</Link>
</li>
{linksArr.map(item => (
<li key={item.name}>
<Link to={item.url}>{item.name}</Link>
</li>
))}
</ul>
</div>
</div>
Expand Down

0 comments on commit 0cb8414

Please sign in to comment.