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
Binary file added service/app/public/og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions service/app/src/app/game/[gameId]/setup/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
import { getGameDetail } from "@/entities/game"

import { GameNavigation } from "./components/gameNavigation"
import { TeamInputForm } from "./components/teamInputForm"
import { TeamSidebar } from "./components/teamSidebar"

export async function generateMetadata({
params,
}: {
params: { gameId: string }
}) {
const { data: game } = await getGameDetail(params.gameId)
return {
title: `${game.gameTitle} - Re:creation`,
robots: {
index: false,
follow: false,
},
openGraph: {
title: game.gameTitle,
type: "website",
locale: "ko_KR",
images: [
{
url: `/og/og-${params.gameId}.png`,
width: 1200,
height: 630,
alt: game.gameTitle,
type: "image/png",
},
],
},
}
}
Comment on lines +7 to +34

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

getGameDetail 실패 시 에러 처리가 필요합니다.

getGameDetail(params.gameId) 호출이 실패할 경우(존재하지 않는 게임, 네트워크 오류 등) 메타데이터 생성이 실패하여 페이지 렌더링에 영향을 줄 수 있습니다. try-catch를 통한 에러 처리 또는 fallback 메타데이터 반환을 권장합니다.

🛡️ 에러 처리 추가 제안
 export async function generateMetadata({
   params,
 }: {
   params: { gameId: string }
 }) {
-  const { data: game } = await getGameDetail(params.gameId)
-  return {
-    title: `${game.gameTitle} - Re:creation`,
-    robots: {
-      index: false,
-      follow: false,
-    },
-    openGraph: {
-      title: game.gameTitle,
-      type: "website",
-      locale: "ko_KR",
-      images: [
-        {
-          url: `/og/og-${params.gameId}.png`,
-          width: 1200,
-          height: 630,
-          alt: game.gameTitle,
-          type: "image/png",
-        },
-      ],
-    },
+  try {
+    const { data: game } = await getGameDetail(params.gameId)
+    return {
+      title: `${game.gameTitle} - Re:creation`,
+      robots: {
+        index: false,
+        follow: false,
+      },
+      openGraph: {
+        title: game.gameTitle,
+        type: "website",
+        locale: "ko_KR",
+        images: [
+          {
+            url: `/og/og-${params.gameId}.png`,
+            width: 1200,
+            height: 630,
+            alt: game.gameTitle,
+            type: "image/png",
+          },
+        ],
+      },
+    }
+  } catch {
+    return {
+      title: "Re:creation",
+      robots: {
+        index: false,
+        follow: false,
+      },
+    }
   }
 }


export default function GameSetupPage() {
return (
<>
Expand Down
4 changes: 2 additions & 2 deletions service/app/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import localFont from "next/font/local"
import { Providers } from "./providers"

export const metadata: Metadata = {
title: "RE:creation",
description: "모두가 가볍게 즐길 수 있는 라이트 레크리에이션",
authors: [{ name: "JECT" }],
metadataBase: new URL("https://re-creation.vercel.app"),
icons: {
icon: [{ url: "/favicon.svg", type: "image/svg+xml" }],
},
Expand Down
38 changes: 38 additions & 0 deletions service/app/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,45 @@
import { Metadata } from "next"

import { GameSection } from "@/app/_components/GameSection/GameSection"
import { HeroSection } from "@/app/_components/HeroSection"
import { HomeNavigation } from "@/widgets/HomeNavigation"

export const metadata: Metadata = {
title: "Re:creation - 모두 함께 즐기는 레크레이션",
description:
"MT, 워크샵, 소모임을 위한 인물 퀴즈, 명대사 퀴즈, 줄줄이 말해요 등 다양한 레크레이션 게임을 만들고 즐길 수 있습니다.",
keywords: [
"레크레이션",
"아이스 브레이킹",
"레크레이션 게임",
"실내 게임 25가지 레크레이션",
"신서유기 게임",
"이름 맞추기",
"퀴즈 사이트",
"엠티 레크레이션",
"기업 레크레이션",
"레크레이션 피피티",
],
openGraph: {
title: "Re:creation - 모두 함께 즐기는 레크레이션",
description:
"MT, 워크숍, 소모임에서 바로 사용할 수 있는 라이트 레크리에이션. 인물퀴즈, 명대사퀴즈 등 다양한 게임으로 분위기를 띄워보세요.",
url: "https://re-creation.vercel.app",
siteName: "Re:creation",
type: "website",
locale: "ko_KR",
images: [
{
url: "/og.png",
width: 1200,
height: 630,
alt: "Re:creation - 모두 함께 즐기는 레크레이션",
type: "image/png",
},
],
},
}

export default function Home() {
return (
<main className="flex min-h-screen w-full flex-col items-center justify-center bg-background-primary">
Expand Down
13 changes: 13 additions & 0 deletions service/app/src/app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { MetadataRoute } from "next"

export default function robots(): MetadataRoute.Robots {
return {
rules: [
{
userAgent: "*",
allow: "/",
disallow: ["/admin"],
},
],
}
}
10 changes: 10 additions & 0 deletions service/app/src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { MetadataRoute } from "next"

export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: "https://re-creation.vercel.app",
lastModified: new Date(),
},
]
}
Loading