import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import CONFIG from '../config'
const MenuGroupCard = props => {
const { postCount, categoryOptions, tagOptions } = props
const { locale } = useGlobal()
const archiveSlot =
{postCount}
const categorySlot = (
{categoryOptions?.length}
)
const tagSlot = {tagOptions?.length}
const links = [
{
name: locale.COMMON.ARTICLE,
href: '/archive',
slot: archiveSlot,
show: CONFIG.MENU_ARCHIVE
},
{
name: locale.COMMON.CATEGORY,
href: '/category',
slot: categorySlot,
show: CONFIG.MENU_CATEGORY
},
{
name: locale.COMMON.TAGS,
href: '/tag',
slot: tagSlot,
show: CONFIG.MENU_TAG
}
]
for (let i = 0; i < links.length; i++) {
if (links[i].id !== i) {
links[i].id = i
}
}
return (
)
}
export default MenuGroupCard