From 255d89217751cfa9b3b534c7ce6853d935195fda Mon Sep 17 00:00:00 2001 From: MrFry Date: Sun, 15 Mar 2020 11:44:22 +0100 Subject: [PATCH] index button highlight --- src/components/layout.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/layout.js b/src/components/layout.js index 5ab24c0..b28b7f3 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -4,7 +4,11 @@ import tabs from '../data/tabs.json' import constants from '../constants.json' export default function Layout (props) { - const { route } = props + let href = props.route + + if (href === '/' || href === '') { + href = 'index' + } return (
@@ -24,7 +28,7 @@ export default function Layout (props) { return ( {item.text} )