7.8 일반 게시판 공용 폼/라우트 템플릿 생성 o

This commit is contained in:
koreacomp5
2025-10-09 17:11:50 +09:00
parent 05ce9f65ea
commit 416071d718
5 changed files with 79 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
import { PostList } from "@/app/components/PostList";
export default async function BoardDetail({ params, searchParams }: { params: { id: string }; searchParams?: { sort?: "recent" | "popular" } }) {
const sort = searchParams?.sort ?? "recent";
return (
<div>
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
<h1></h1>
<a href={`/posts/new?boardId=${params.id}`}><button> </button></a>
</div>
<PostList boardId={params.id} sort={sort} />
</div>
);
}