2025-03-04 16:13:41 +08:00
|
|
|
import { getLinkList } from "@/app/_lib/data/link";
|
2025-02-25 19:04:37 +08:00
|
|
|
import { getLinkType } from "@/app/_lib/data/linkType";
|
2025-02-24 23:21:15 +08:00
|
|
|
import { LinkBlock } from "@/app/_ui/LinkListBox";
|
|
|
|
import Search from "@/app/_ui/Search";
|
2025-03-04 16:13:41 +08:00
|
|
|
import { Suspense } from "react";
|
2025-02-24 23:21:15 +08:00
|
|
|
|
|
|
|
export default async function Page({ params }: { params: Promise<{ id: string }> }) {
|
|
|
|
|
|
|
|
const id = (await params).id
|
2025-02-25 19:04:37 +08:00
|
|
|
const linkType = await getLinkType(id)
|
2025-03-04 16:13:41 +08:00
|
|
|
const { list: linkList } = await getLinkList({ filter: { type: id } })
|
2025-02-24 23:21:15 +08:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
{/* <HeaderNav></HeaderNav> */}
|
|
|
|
<main className="w-full p-5">
|
2025-03-04 16:13:41 +08:00
|
|
|
<Suspense fallback={<div>...</div>}>
|
|
|
|
|
|
|
|
<Search></Search >
|
|
|
|
</Suspense>
|
2025-02-25 19:04:37 +08:00
|
|
|
<h1 className="text-3xl font-bold mb-6 flex justify-center">{linkType?.label}</h1>
|
2025-02-24 23:21:15 +08:00
|
|
|
<div className=" grid grid-cols-3 lg:grid-cols-6 gap-4 ">
|
|
|
|
{
|
|
|
|
linkList.map(val => (
|
|
|
|
<LinkBlock val={val} key={val._id} />
|
|
|
|
|
|
|
|
))
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
{/* <PosterBox posterList={[]} /> */}
|
|
|
|
</>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|