fix: Next15 호환 업데이트 및 인증/게시판 기능 개선\n\n- 헤더를 클라이언트 컴포넌트로 전환, 세션 표시/로그아웃 추가\n- /api/auth/session GET 추가, 로그인/회원가입 페이지 연결\n- 서버 컴포넌트에서 params/searchParams 안전 언랩 적용\n- 서버 fetch 절대 URL 구성(헤더 기반)으로 500/URL 오류 해결\n- 새 글 페이지 useSearchParams로 전환 및 폼 검증/에러 표시 추가\n- 회원가입 폼 fieldErrors 표시 및 a11y 속성 보완\n- Partner.name @unique 추가 및 시드 정상화
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { headers } from "next/headers";
|
||||
import React, { use } from "react";
|
||||
|
||||
export default async function PostDetail({ params }: { params: Promise<{ id: string }> }) {
|
||||
const { id } = use(params);
|
||||
// 서버 전용 페이지: params가 Promise일 수 있어 안전 언랩 후 절대 URL로 fetch합니다.
|
||||
export default async function PostDetail({ params }: { params: any }) {
|
||||
const p = params?.then ? await params : params;
|
||||
const id = p.id as string;
|
||||
const h = await headers();
|
||||
const host = h.get("host") ?? "localhost:3000";
|
||||
const proto = h.get("x-forwarded-proto") ?? "http";
|
||||
|
||||
Reference in New Issue
Block a user