Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/extra-info/_components/StartExtraInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const StartExtraInfo = () => {

return (
<section className="flex w-full flex-col items-center px-[15px]">
<div className="typo-18-600 mt-[18.1vh] mb-[44.2vh] flex flex-col items-center gap-2 leading-2 text-gray-800">
<div className="typo-18-600 mt-[18.1vh] mb-[44.2vh] flex flex-col items-center gap-2 leading-[160%] text-gray-800">
<span
className={cn(
"transition-opacity duration-700 ease-in-out",
Expand Down
1 change: 1 addition & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const pretendard = localFont({
});

export const metadata: Metadata = {
metadataBase: new URL("https://comatching.com"), // 실제 도메인 주소로 변경 필요
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

metadataBase에 URL을 하드코딩하는 대신 환경 변수를 사용하는 것을 권장합니다. 코드에 남겨주신 주석(// 실제 도메인 주소로 변경 필요)을 고려할 때, 환경별로 다른 도메인을 설정해야 할 수 있습니다. 환경 변수를 사용하면 개발, 스테이징, 프로덕션 환경에 따라 유연하게 URL을 관리할 수 있어 유지보수성이 향상됩니다.

예를 들어, process.env.NEXT_PUBLIC_SITE_URL을 사용하고, 설정되지 않았을 경우를 대비해 기본값을 제공하는 방식이 좋습니다.

Suggested change
metadataBase: new URL("https://comatching.com"), // 실제 도메인 주소로 변경 필요
metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || "https://comatching.com"), // 실제 도메인 주소로 변경 필요

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Wrong metadatabase domain 🐞 Bug ✓ Correctness

app/layout.tsx hardcodes metadataBase to https://comatching.com, so relative OpenGraph/Twitter
image URLs like /og-image.png resolve to the wrong host when the app is served from
comatching.site. This breaks link previews/canonical URL resolution for the actual deployment
domain referenced elsewhere in the codebase.
Agent Prompt
### Issue description
`metadataBase` is hardcoded to `https://comatching.com`, but the app uses relative OG/Twitter image URLs and the codebase references `https://comatching.site` as the expected frontend domain. This causes OG/Twitter tags to point at the wrong host.

### Issue Context
Next.js resolves relative metadata URLs (like `/og-image.png`) against `metadataBase`. If the deployment host differs (prod/staging/preview), hardcoding the base will break link previews.

### Fix Focus Areas
- app/layout.tsx[17-45]
- lib/actions/loginAction.ts[73-81]

### Implementation notes
- Introduce an env var such as `NEXT_PUBLIC_SITE_URL` (or `SITE_URL`) and set it per environment.
- Set `metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3000")` (or equivalent server-only env) and ensure the value matches the actual deployed frontend domain.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

title: {
default: "코매칭",
template: "%s | 코매칭",
Expand Down
2 changes: 1 addition & 1 deletion app/onboarding/_components/StartOnBoarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const StartOnBoarding = () => {

return (
<section className="flex w-full flex-col items-center px-[15px]">
<div className="typo-18-600 mt-[18.1vh] mb-[44.2vh] flex flex-col items-center gap-2 leading-2 text-gray-800">
<div className="typo-18-600 mt-[18.1vh] mb-[44.2vh] flex flex-col items-center gap-2 leading-[160%] text-gray-800">
<span
style={{
opacity: showFirst ? 1 : 0,
Expand Down
Loading