mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
30 lines
678 B
JavaScript
30 lines
678 B
JavaScript
|
|
import CategoryList from './CategoryList'
|
|
import StickyBar from './StickyBar'
|
|
import TagList from './TagList'
|
|
|
|
/**
|
|
* 博客列表上方嵌入
|
|
* @param {*} props
|
|
* @returns
|
|
*/
|
|
export default function BlogListBar(props) {
|
|
const { tagOptions, tag } = props
|
|
const { category, categoryOptions } = props
|
|
if (tag) {
|
|
return (
|
|
<StickyBar>
|
|
<TagList tagOptions={tagOptions} currentTag={tag} />
|
|
</StickyBar>
|
|
)
|
|
} else if (category) {
|
|
return (
|
|
<StickyBar>
|
|
<CategoryList currentCategory={category} categoryOptions={categoryOptions} />
|
|
</StickyBar>
|
|
)
|
|
} else {
|
|
return <></>
|
|
}
|
|
}
|