Skip to content

Commit

Permalink
chore: renamed navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
zstix committed Apr 21, 2020
1 parent b947b88 commit 5da4c56
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
import Container from './Container';
import './Header.scss';

const Header = ({ links }) => {
const Header = ({ pages }) => {
// NOTE: we may want to abstract this
const data = useStaticQuery(graphql`
query {
Expand Down Expand Up @@ -88,10 +88,10 @@ const Header = ({ links }) => {

<nav className="Header-nav Header-nav--main">
<ul>
{links.map((link, i) => (
{pages.map((page, i) => (
<li key={i}>
<Link to={link.url} className="Header-nav-link">
{link.displayName}
<Link to={page.path} className="Header-nav-link">
{page.displayName}
</Link>
</li>
))}
Expand All @@ -104,22 +104,22 @@ const Header = ({ links }) => {
};

Header.propTypes = {
links: PropTypes.arrayOf(
pages: PropTypes.arrayOf(
PropTypes.shape({
displayName: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
path: PropTypes.string.isRequired,
active: PropTypes.bool,
})
),
};

Header.defaultProps = {
links: [
{ displayName: 'Collect Data', url: '' },
{ displayName: 'Explore Data', url: '' },
{ displayName: 'Build Apps', url: '' },
{ displayName: 'Automate New Relic', url: '' },
{ displayName: 'Reference Docs', url: '' },
pages: [
{ displayName: 'Collect Data', path: '' },
{ displayName: 'Explore Data', path: '' },
{ displayName: 'Build Apps', path: '' },
{ displayName: 'Automate New Relic', path: '' },
{ displayName: 'Reference Docs', path: '' },
],
};

Expand Down

0 comments on commit 5da4c56

Please sign in to comment.