import { getLinkList, getLinkListAll } from "@/app/_lib/data/link";
import { LinkBlock } from "@/app/_ui/LinkListBox";
import Search from "@/app/_ui/Search";
import { use } from "react";

export default async function Page({ params }: { params: Promise<{ id: string }> }) {

    const id = (await params).id
    const { list: linkList } = await getLinkList({ typeId: id })

    return (
        <>
            {/* <HeaderNav></HeaderNav> */}
            <main className="w-full p-5">
                <Search></Search >
                <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={[]} /> */}
        </>



    );
}
