import Link from 'next/link' import { useGlobal } from '@/lib/global' import TagItemMiddle from './TagItemMiddle' export default function BlogListBar(props) { const { category, categoryOptions, tag, tagOptions } = props const { locale } = useGlobal() if (category) { return (
{categoryOptions?.map(e => { const selected = e.name === category return (
{e.name}({e.count})
) })}
) } else if (tag) { return
{locale.COMMON.TAGS}
{tagOptions?.map(e => { const selected = tag === e.name return (
) })}
} else { return <> } }