From c85450ce37d243a5bf2f7199916507f6737c51a6 Mon Sep 17 00:00:00 2001 From: koreacomp5 Date: Fri, 28 Nov 2025 05:29:34 +0900 Subject: [PATCH] board notfound --- src/app/boards/[id]/page.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/app/boards/[id]/page.tsx b/src/app/boards/[id]/page.tsx index 5c1933d..d044ed7 100644 --- a/src/app/boards/[id]/page.tsx +++ b/src/app/boards/[id]/page.tsx @@ -4,7 +4,6 @@ import Link from "next/link"; import { BoardToolbar } from "@/app/components/BoardToolbar"; import { headers } from "next/headers"; import prisma from "@/lib/prisma"; -import { notFound } from "next/navigation"; import { UserAvatar } from "@/app/components/UserAvatar"; import { RankIcon1st } from "@/app/components/RankIcon1st"; import { RankIcon2nd } from "@/app/components/RankIcon2nd"; @@ -34,10 +33,7 @@ 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.slug === idOrSlug || b.id === idOrSlug); - if (!board) { - return notFound(); - } - const id = board.id as string; + const id = board?.id as string; const siblingBoards = (boards || []).filter((b: any) => b.category?.id && b.category.id === board?.category?.id); const categoryName = board?.category?.name ?? ""; // 메인배너 표시 설정