make tagslist visible in postsindex page only.
This commit is contained in:
@@ -10,7 +10,7 @@ import { TagBadge } from "@/components/utils/TagBadge";
|
|||||||
import { PostCountPerPagination } from "@/consts/consts";
|
import { PostCountPerPagination } from "@/consts/consts";
|
||||||
import { Config } from "@/data/config";
|
import { Config } from "@/data/config";
|
||||||
import { sortedPosts } from "@/lib/post-process";
|
import { sortedPosts } from "@/lib/post-process";
|
||||||
import { paginateArray } from "@/lib/utils";
|
import { isEmptyArray, paginateArray } from "@/lib/utils";
|
||||||
import { fontFangZhengXiaoBiaoSongCN, fontSourceSerifScreenCN } from "@/styles/font";
|
import { fontFangZhengXiaoBiaoSongCN, fontSourceSerifScreenCN } from "@/styles/font";
|
||||||
import { TPostListItem } from "@/types/post-list";
|
import { TPostListItem } from "@/types/post-list";
|
||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
@@ -60,12 +60,16 @@ export default function PostsPage(props: PostsPageProps) {
|
|||||||
<LuPenTool className="mx-2 my-auto" />
|
<LuPenTool className="mx-2 my-auto" />
|
||||||
{"ALL POSTS"}
|
{"ALL POSTS"}
|
||||||
</h2>
|
</h2>
|
||||||
<Separator />
|
{!isEmptyArray(props.tagList) && (
|
||||||
<div className={`my-5 flex flex-wrap justify-center px-2 ${fontSourceSerifScreenCN.className}`}>
|
<>
|
||||||
{props.tagList.map((item) => (
|
<Separator />
|
||||||
<TagBadge key={`tag-badge-${nanoid()}`} name={item.name} size="md" count={item.count} />
|
<div className={`my-5 flex flex-wrap justify-center px-2 ${fontSourceSerifScreenCN.className}`}>
|
||||||
))}
|
{props.tagList.map((item) => (
|
||||||
</div>
|
<TagBadge key={`tag-badge-${nanoid()}`} name={item.name} size="md" count={item.count} />
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<Separator />
|
<Separator />
|
||||||
<PostList data={props.postList} />
|
<PostList data={props.postList} />
|
||||||
<div className="my-5 flex justify-between text-base font-bold">
|
<div className="my-5 flex justify-between text-base font-bold">
|
||||||
|
|||||||
Reference in New Issue
Block a user