Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughNext.js 앱에 새로운 개인정보 보호정책 페이지를 추가합니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/app/`(unauth)/privacy/page.tsx:
- Around line 1-7: The page is not re-exporting the SEO metadata from
privacyPolicyPage.tsx so title/description/robots don't apply; import or
re-export the metadata defined in that module (referencing
privacyPolicyPage.tsx's exported symbol metadata) and export it from this file
(e.g., export const metadata = /* the imported metadata */ or use export {
metadata } from '../../../components/pages/privacy/privacyPolicyPage') so the
Privacy page exposes the same metadata as PrivacyPolicyPage.
In `@src/components/pages/privacy/privacyPolicyPage.tsx`:
- Around line 8-12: The exported metadata in privacyPolicyPage.tsx (export const
metadata using APP_NAME) won't be picked up by Next.js App Router because
metadata must be defined or re-exported from a page.tsx/layout.tsx/route.tsx;
move the metadata definition into the corresponding page.tsx or add a re-export
there (e.g. in page.tsx: export { metadata } from '...privacyPolicyPage') so
Next recognizes title/description/robots; keep the same metadata symbol and
APP_NAME reference when moving/re-exporting.
| import { PrivacyPolicyPage } from '../../../components/pages/privacy/privacyPolicyPage' | ||
|
|
||
| function Privacy() { | ||
| return <PrivacyPolicyPage /> | ||
| } | ||
|
|
||
| export default Privacy |
There was a problem hiding this comment.
metadata re-export 누락
privacyPolicyPage.tsx에서 정의한 metadata가 이 페이지 파일에서 re-export되지 않아 SEO 메타데이터(title, description, robots)가 적용되지 않습니다.
🔧 수정 제안
-import { PrivacyPolicyPage } from '../../../components/pages/privacy/privacyPolicyPage'
+import { PrivacyPolicyPage, metadata } from '../../../components/pages/privacy/privacyPolicyPage'
+
+export { metadata }
function Privacy() {
return <PrivacyPolicyPage />
}
export default Privacy📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import { PrivacyPolicyPage } from '../../../components/pages/privacy/privacyPolicyPage' | |
| function Privacy() { | |
| return <PrivacyPolicyPage /> | |
| } | |
| export default Privacy | |
| import { PrivacyPolicyPage, metadata } from '../../../components/pages/privacy/privacyPolicyPage' | |
| export { metadata } | |
| function Privacy() { | |
| return <PrivacyPolicyPage /> | |
| } | |
| export default Privacy |
🤖 Prompt for AI Agents
In `@src/app/`(unauth)/privacy/page.tsx around lines 1 - 7, The page is not
re-exporting the SEO metadata from privacyPolicyPage.tsx so
title/description/robots don't apply; import or re-export the metadata defined
in that module (referencing privacyPolicyPage.tsx's exported symbol metadata)
and export it from this file (e.g., export const metadata = /* the imported
metadata */ or use export { metadata } from
'../../../components/pages/privacy/privacyPolicyPage') so the Privacy page
exposes the same metadata as PrivacyPolicyPage.
| export const metadata: Metadata = { | ||
| title: `개인정보 처리방침 | ${APP_NAME}`, | ||
| description: `${APP_NAME} 개인정보 처리방침`, | ||
| robots: { index: true, follow: true }, | ||
| } |
There was a problem hiding this comment.
Next.js App Router에서 metadata export가 적용되지 않음
Next.js App Router에서 metadata는 page.tsx, layout.tsx, 또는 route.tsx 파일에서만 인식됩니다. 컴포넌트 파일에서 export한 metadata는 무시되므로, 실제로 페이지의 title과 description이 적용되지 않습니다.
page.tsx에서 metadata를 re-export하거나, 해당 파일에서 직접 정의해야 합니다.
🔧 page.tsx에서 metadata re-export 예시
// src/app/(unauth)/privacy/page.tsx
export { metadata } from '../../../components/pages/privacy/privacyPolicyPage'또는 page.tsx에서 직접 정의:
import type { Metadata } from 'next'
export const metadata: Metadata = {
title: '개인정보 처리방침 | Valanse',
description: 'Valanse 개인정보 처리방침',
robots: { index: true, follow: true },
}🤖 Prompt for AI Agents
In `@src/components/pages/privacy/privacyPolicyPage.tsx` around lines 8 - 12, The
exported metadata in privacyPolicyPage.tsx (export const metadata using
APP_NAME) won't be picked up by Next.js App Router because metadata must be
defined or re-exported from a page.tsx/layout.tsx/route.tsx; move the metadata
definition into the corresponding page.tsx or add a re-export there (e.g. in
page.tsx: export { metadata } from '...privacyPolicyPage') so Next recognizes
title/description/robots; keep the same metadata symbol and APP_NAME reference
when moving/re-exporting.
📝 요약
✅ 작업 내용
🧪 테스트 방법
Summary by CodeRabbit
새로운 기능
✏️ Tip: You can customize this high-level summary in your review settings.