mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 23:16:49 +00:00
feature:
文章分类功能
This commit is contained in:
@@ -3,8 +3,9 @@ import MenuButtonGroup from '@/components/MenuButtonGroup'
|
||||
import InfoCard from '@/components/InfoCard'
|
||||
import TagList from '@/components/TagList'
|
||||
import LatestPosts from '@/components/LatestPosts'
|
||||
import PostsCategories from '@/components/PostsCategories'
|
||||
|
||||
const SideBar = ({ tags, currentTag, post, posts }) => {
|
||||
const SideBar = ({ tags, currentTag, post, posts, categories, currentCategory }) => {
|
||||
// 按时间排序
|
||||
if (posts) {
|
||||
posts = posts.sort((a, b) => {
|
||||
@@ -26,6 +27,13 @@ const SideBar = ({ tags, currentTag, post, posts }) => {
|
||||
|
||||
<hr className='dark:border-gray-700 my-2' />
|
||||
|
||||
{/* 分类 */}
|
||||
{categories && (
|
||||
<div className='mt-2'>
|
||||
<PostsCategories currentCategory={currentCategory} categories={categories}/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 最新文章 */}
|
||||
{posts && (
|
||||
<div className='mt-2'>
|
||||
|
||||
Reference in New Issue
Block a user