fix
Some checks failed
deploy-on-main / deploy (push) Failing after 22s

This commit is contained in:
koreacomp5
2025-11-10 00:04:17 +09:00
parent a007ac11ce
commit 4337a8f69a
39 changed files with 1345 additions and 222 deletions

View File

@@ -4,6 +4,8 @@ import { HeroBanner } from "@/app/components/HeroBanner";
import { RelatedPosts } from "./RelatedPosts";
import prisma from "@/lib/prisma";
import { CommentSection } from "@/app/components/CommentSection";
import { UserNameMenu } from "@/app/components/UserNameMenu";
import { ViewTracker } from "./ViewTracker";
// 서버 전용 페이지: params가 Promise일 수 있어 안전 언랩 후 절대 URL로 fetch합니다.
export default async function PostDetail({ params }: { params: any }) {
@@ -53,6 +55,7 @@ export default async function PostDetail({ params }: { params: any }) {
return (
<div className="space-y-6">
<ViewTracker postId={id} />
{/* 상단 배너 */}
{showBanner && (
<section>
@@ -68,9 +71,18 @@ export default async function PostDetail({ params }: { params: any }) {
<section className="rounded-xl overflow-hidden bg-white">
<header className="px-4 py-3 border-b border-neutral-200">
<h1 className="text-xl md:text-2xl font-bold text-neutral-900 break-words">{post.title}</h1>
{createdAt && (
<p className="mt-1 text-xs text-neutral-500">{createdAt.toLocaleString()}</p>
)}
<div className="mt-1 text-xs text-neutral-500 flex items-center gap-2">
<span>
<UserNameMenu
userId={post?.author?.userId ?? null}
nickname={post?.author?.nickname ?? null}
isAnonymous={post?.isAnonymous}
underlineOnHover={false}
/>
</span>
{createdAt && <span aria-hidden></span>}
{createdAt && <span>{createdAt.toLocaleString()}</span>}
</div>
</header>
<div className="p-4 md:p-6">
<div