import prisma from "@/lib/prisma"; import { notFound } from "next/navigation"; import { PostList } from "@/app/components/PostList"; import { headers } from "next/headers"; import { HeroBanner } from "@/app/components/HeroBanner"; import { UserAvatar } from "@/app/components/UserAvatar"; import { GradeIcon, getGradeName } from "@/app/components/GradeIcon"; export default async function UserPublicProfile({ params }: { params: Promise<{ id: string }> }) { const p = await params; const userId = p.id; const user = await prisma.user.findUnique({ where: { userId }, select: { userId: true, nickname: true, profileImage: true, level: true, grade: true, points: true, }, }); if (!user) return notFound(); // 메인배너 표시 설정을 재사용(일관 UI) const SETTINGS_KEY = "mainpage_settings" as const; const settingRow = await prisma.setting.findUnique({ where: { key: SETTINGS_KEY } }); const parsed = settingRow ? JSON.parse(settingRow.value as string) : {}; const showBanner: boolean = parsed.showBanner ?? true; return (