import Link from 'next/link' import { useRouter } from 'next/router' import { useGlobal } from '@/lib/global' import CONFIG from '../config' import { siteConfig } from '@/lib/config' const MenuList = (props) => { const { postCount, customNav } = props const { locale } = useGlobal() const router = useRouter() const archiveSlot =
{postCount}
let links = [ { icon: 'fas fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true }, { icon: 'fas fa-th', name: locale.COMMON.CATEGORY, to: '/category', show: siteConfig('MATERY_MENU_CATEGORY', null, CONFIG) }, { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: siteConfig('MATERY_MENU_TAG', null, CONFIG) }, { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: siteConfig('MATERY_MENU_ARCHIVE', null, CONFIG) }, { icon: 'fas fa-search', name: locale.NAV.SEARCH, to: '/search', show: siteConfig('MATERY_MENU_SEARCH', null, CONFIG) } ] if (customNav) { links = links.concat(customNav) } return ( ) } export default MenuList