main
This commit is contained in:
@@ -8,7 +8,7 @@ import { HeroBanner } from "@/app/components/HeroBanner";
|
||||
|
||||
export default function EditPostPage() {
|
||||
const params = useParams<{ id: string }>();
|
||||
const id = params?.id as string;
|
||||
const id = params?.id as string; // slug 값
|
||||
const router = useRouter();
|
||||
const { show } = useToast();
|
||||
const [form, setForm] = useState<{ title: string; content: string } | null>(null);
|
||||
|
||||
@@ -5,7 +5,7 @@ import { HeroBanner } from "@/app/components/HeroBanner";
|
||||
// 서버 전용 페이지: 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 id = p.id as string; // slug 값이 들어옴
|
||||
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