import { siteConfig } from '@/lib/config'
import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import CONFIG from '../config'
const MenuGroupCard = props => {
const { postCount, categories, tags } = props
const { locale } = useGlobal()
const archiveSlot =
{postCount}
const categorySlot = {categories?.length}
const tagSlot = {tags?.length}
const links = [
{
name: locale.COMMON.ARTICLE,
to: '/archive',
slot: archiveSlot,
show: siteConfig('MATERY_MENU_ARCHIVE', null, CONFIG)
},
{
name: locale.COMMON.CATEGORY,
to: '/category',
slot: categorySlot,
show: siteConfig('MATERY_MENU_CATEGORY', null, CONFIG)
},
{
name: locale.COMMON.TAGS,
to: '/tag',
slot: tagSlot,
show: siteConfig('MATERY_MENU_TAG', null, CONFIG)
}
]
return (
)
}
export default MenuGroupCard