-
Notifications
You must be signed in to change notification settings - Fork 3
chore: 웹 React 19 업그레이드 #533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e6815ec
f18f9b8
f548ec5
2ae93b0
0509ae2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,19 +3,19 @@ import type { Metadata } from "next"; | |||||||||||||||||||
| import PostPageContent from "./PostPageContent"; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| interface PostPageProps { | ||||||||||||||||||||
| params: { | ||||||||||||||||||||
| params: Promise<{ | ||||||||||||||||||||
| boardCode: string; | ||||||||||||||||||||
| postId: string; | ||||||||||||||||||||
| }; | ||||||||||||||||||||
| }>; | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| export const metadata: Metadata = { | ||||||||||||||||||||
| title: "게시글", | ||||||||||||||||||||
| }; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| const PostPage = ({ params }: PostPageProps) => { | ||||||||||||||||||||
| const { boardCode } = params; | ||||||||||||||||||||
| const postId = Number(params.postId); | ||||||||||||||||||||
| const PostPage = async ({ params }: PostPageProps) => { | ||||||||||||||||||||
| const { boardCode, postId: postIdParam } = await params; | ||||||||||||||||||||
| const postId = Number(postIdParam); | ||||||||||||||||||||
|
Comment on lines
+17
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1) 숫자 파라미터 검증이 빠져서 수정 예시 import type { Metadata } from "next";
+import { notFound } from "next/navigation";
@@
const PostPage = async ({ params }: PostPageProps) => {
const { boardCode, postId: postIdParam } = await params;
const postId = Number(postIdParam);
+ if (Number.isNaN(postId)) notFound();📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
|
|
||||||||||||||||||||
| return ( | ||||||||||||||||||||
| <div className="w-full"> | ||||||||||||||||||||
|
|
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next를
^16.2.6로 올리면next dev의 기본 번들러가 Turbopack으로 바뀌는데, 현재 설정은build만--webpack으로 고정되어 있어 개발 서버에서는next.config.mjs의webpack()(여기서@svgr/webpack을 등록) 구성이 적용되지 않습니다. 이 저장소는public/svgs/*.svg를 React 컴포넌트로 광범위하게 import하므로,pnpm dev에서 SVG import가 깨지거나 런타임 렌더링 오류가 발생할 수 있습니다.Useful? React with 👍 / 👎.