mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
fix link null
This commit is contained in:
@@ -55,7 +55,7 @@ export default function TopNavBar(props) {
|
||||
{/* 顶部菜单 */}
|
||||
<div className='hidden md:flex'>
|
||||
{navs && navs.map(link => {
|
||||
if (link.show) {
|
||||
if (link?.show) {
|
||||
const selected = (router.pathname === link.to) || (router.asPath === link.to)
|
||||
return <Link key={`${link.id}-${link.to}`} title={link.to} href={link.to} >
|
||||
<a target={link.to.indexOf('http') === 0 ? '_blank' : '_self'} className={'px-2 duration-300 text-sm justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
|
||||
|
||||
Reference in New Issue
Block a user