import React from 'react' import Link from 'next/link' import { useRouter } from 'next/router' import { useGlobal } from '@/lib/global' import CONFIG_NEXT from '../config_next' const MenuButtonGroup = (props) => { const { postCount, customNav } = props const { locale } = useGlobal() const router = useRouter() const archiveSlot =
{postCount}
const defaultLinks = [ { icon: 'fas fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true }, { icon: 'fas fa-th', name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_NEXT.MENU_CATEGORY }, { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_NEXT.MENU_TAG }, { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: CONFIG_NEXT.MENU_ARCHIVE } ] let links = [].concat(defaultLinks) if (customNav) { links = defaultLinks.concat(customNav) } return ( ); } export default MenuButtonGroup