diff --git a/src/components/nav-link.js b/src/components/nav-link.js index 434d848..5976b78 100644 --- a/src/components/nav-link.js +++ b/src/components/nav-link.js @@ -26,7 +26,7 @@ const Link = styled(GatsbyLink)` padding: 9px 0; border-bottom: 2px solid ${props => - props.active || props.partiallyActive + props.active === "true" || props.partiallyActive ? `var(--color-white)` : `transparent`}; } diff --git a/src/components/nav.js b/src/components/nav.js index 0d637f7..dd91d42 100644 --- a/src/components/nav.js +++ b/src/components/nav.js @@ -124,7 +124,7 @@ export default function Nav({ location, data, open, setOpen }) { subNav={link.subNav} to={link.to} location={location} - active={location === link.to} + active={location === link.to ? "true" : "false"} partiallyActive={ link.subNav && location && location.indexOf(link.to) === 0 } diff --git a/src/pages/index.js b/src/pages/index.js index 53c9fcf..5027c87 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -140,21 +140,30 @@ export default function Index({ data }) { - + - + - +