diff --git a/.cursor/.prompt/1024memo.md b/.cursor/.prompt/1024memo.md index ca4ff44..2e36509 100644 --- a/.cursor/.prompt/1024memo.md +++ b/.cursor/.prompt/1024memo.md @@ -1,7 +1,6 @@ # home main 화면 구성 - [] 1. 상단엔 네비게이션 바가 있고 하단엔 footer가 있음 (이미 만들어져있음) - [] 2. 메인 컨테이너 top마진 48 bottom 마진140 x마진 60 (또는 패딩으로 자연스럽게) - [] 3. 메인 컨테이너는 위부터 높이가 264, 448, 594, 592 (패딩 또는 마진 포함해서 자연스럽게) + [] 1. 상단엔 네비게이션 바가 있고 하단엔 footer가 있음 (이미 만들어져있음) 메인 컨테이너 top마진 48 bottom 마진140 x마진 60 (또는 패딩으로 자연스럽게) + [] 2. 메인 컨테이너는 내부 컨텐츠는 위부터 높이가 264, 448, 594, 592 인 플랙스로 구성 (패딩 또는 마진 포함해서 자연스럽게) [] 3. [] 3. [] 3. diff --git a/.cursor/.prompt/_101101_메인페이지구성.md b/.cursor/.prompt/done/_101101_메인페이지구성.md similarity index 100% rename from .cursor/.prompt/_101101_메인페이지구성.md rename to .cursor/.prompt/done/_101101_메인페이지구성.md diff --git a/.cursor/.prompt/_header_navigation작업.md b/.cursor/.prompt/done/_header_navigation작업.md similarity index 100% rename from .cursor/.prompt/_header_navigation작업.md rename to .cursor/.prompt/done/_header_navigation작업.md diff --git a/.cursor/.prompt/_todolist.md b/.cursor/.prompt/done/_todolist.md similarity index 100% rename from .cursor/.prompt/_todolist.md rename to .cursor/.prompt/done/_todolist.md diff --git a/.cursor/.prompt/_게시판 대분류작업.md b/.cursor/.prompt/done/_게시판 대분류작업.md similarity index 100% rename from .cursor/.prompt/_게시판 대분류작업.md rename to .cursor/.prompt/done/_게시판 대분류작업.md diff --git a/src/app/api/posts/route.ts b/src/app/api/posts/route.ts index 0303448..97230ef 100644 --- a/src/app/api/posts/route.ts +++ b/src/app/api/posts/route.ts @@ -108,6 +108,7 @@ export async function GET(req: Request) { boardId: true, isPinned: true, status: true, + author: { select: { nickname: true } }, stat: { select: { recommendCount: true, views: true, commentsCount: true } }, postTags: { select: { tag: { select: { name: true, slug: true } } } }, }, diff --git a/src/app/boards/[id]/page.tsx b/src/app/boards/[id]/page.tsx index 2dd8501..537def0 100644 --- a/src/app/boards/[id]/page.tsx +++ b/src/app/boards/[id]/page.tsx @@ -1,4 +1,5 @@ import { PostList } from "@/app/components/PostList"; +import { HeroBanner } from "@/app/components/HeroBanner"; import { headers } from "next/headers"; // Next 15: params/searchParams가 Promise가 될 수 있어 안전 언랩 처리합니다. @@ -15,13 +16,50 @@ export default async function BoardDetail({ params, searchParams }: { params: an const res = await fetch(new URL("/api/boards", base).toString(), { cache: "no-store" }); const { boards } = await res.json(); const board = (boards || []).find((b: any) => b.id === id); + const siblingBoards = (boards || []).filter((b: any) => b.category?.id && b.category.id === board?.category?.id); + const categoryName = board?.category?.name ?? ""; return ( -
{card.region}
+{card.name}
+{card.address}
+