mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 23:16:49 +00:00
20 lines
598 B
JavaScript
20 lines
598 B
JavaScript
import { useGlobal } from '@/lib/global'
|
|
|
|
/**
|
|
* 文章列表上方嵌入
|
|
* @param {*} props
|
|
* @returns
|
|
*/
|
|
export default function BlogPostBar(props) {
|
|
const { tag, category } = props
|
|
const { locale } = useGlobal()
|
|
|
|
if (tag) {
|
|
return <div className='flex items-center py-8'><div className='text-xl'><i className='mr-2 fas fa-tag' />{locale.COMMON.TAGS}:</div>{tag}</div>
|
|
} else if (category) {
|
|
<div className='flex items-center py-8'><div className='text-xl'><i className='mr-2 fas fa-th' />{locale.COMMON.CATEGORY}:</div>{category}</div>
|
|
} else {
|
|
return <></>
|
|
}
|
|
}
|