diff --git a/themes/hexo/components/MenuButtonGroupTop.js b/themes/hexo/components/MenuButtonGroupTop.js index 0d21721f..c8d087fc 100644 --- a/themes/hexo/components/MenuButtonGroupTop.js +++ b/themes/hexo/components/MenuButtonGroupTop.js @@ -22,7 +22,7 @@ const MenuButtonGroupTop = (props) => { {links.map(link => { if (link.show) { return - +
{link.name}
diff --git a/themes/hexo/components/MenuGroupCard.js b/themes/hexo/components/MenuGroupCard.js index 3c8fee64..a36aede5 100644 --- a/themes/hexo/components/MenuGroupCard.js +++ b/themes/hexo/components/MenuGroupCard.js @@ -20,7 +20,7 @@ const MenuGroupCard = (props) => { {links.map(link => { if (link.show) { return -
+
{link.name}
{link.slot}
diff --git a/themes/hexo/components/MenuList.js b/themes/hexo/components/MenuList.js index bf8ac23b..c8103624 100644 --- a/themes/hexo/components/MenuList.js +++ b/themes/hexo/components/MenuList.js @@ -22,23 +22,23 @@ const MenuList = (props) => { } return
+ {links.map(link => { + if (link && link.show) { + const selected = (router.pathname === link.to) || (router.asPath === link.to) + return + +
+ +
{link.name}
+
+ {link.slot} +
+ + } else { + return null + } + })} + } export default MenuList diff --git a/themes/medium/components/TopNavBar.js b/themes/medium/components/TopNavBar.js index b1ed876b..2c48ec7b 100644 --- a/themes/medium/components/TopNavBar.js +++ b/themes/medium/components/TopNavBar.js @@ -21,7 +21,7 @@ export default function TopNavBar (props) { if (link.show) { const selected = (router.pathname === link.to) || (router.asPath === link.to) return -