From 5e1521c6bc7492b372cfc4c35daf41f8473cde50 Mon Sep 17 00:00:00 2001 From: Harun CAN Date: Mon, 9 Mar 2026 02:17:25 +0300 Subject: [PATCH] main --- src/app/[locale]/(site)/games/[slug]/page.tsx | 124 ++---------------- 1 file changed, 8 insertions(+), 116 deletions(-) diff --git a/src/app/[locale]/(site)/games/[slug]/page.tsx b/src/app/[locale]/(site)/games/[slug]/page.tsx index c795325..b8456f8 100644 --- a/src/app/[locale]/(site)/games/[slug]/page.tsx +++ b/src/app/[locale]/(site)/games/[slug]/page.tsx @@ -1,120 +1,12 @@ -import { notFound } from 'next/navigation'; -import { Container, Heading, Text, Box, Image, Badge, HStack, VStack, Icon, Flex } from '@chakra-ui/react'; -import { MOCK_GAMES } from '@/lib/api/mock-data'; -import { FaCalendar, FaGamepad } from 'react-icons/fa'; -interface PageProps { - params: Promise<{ - slug: string; - locale: string; - }>; -} +import { GameDetail } from "@/components/features/games/GameDetail"; -export default async function GameDetailsPage({ params }: PageProps) { +type Props = { + params: Promise<{ slug: string }>; +}; + +export default async function GamePage({ params }: Props) { const { slug } = await params; - const game = MOCK_GAMES.find((g) => g.slug === slug); - - if (!game) { - notFound(); - } - - // Format date - const formattedDate = new Intl.DateTimeFormat('en-US', { - dateStyle: 'long', - }).format(game.releaseDate); - - return ( - - {/* Hero / Cover Section */} - - {game.title} - - - {game.title} - - - {new Date() < game.releaseDate ? 'Upcoming' : 'Released'} - - {game.platforms.map(p => ( - - {p} - - ))} - - - - - - {/* Details Grid */} - - {/* Main Content */} - - About - - {/* Fallback description since mock doesn't have it yet */} - {game.title} is an anticipated title releasing on {formattedDate}. - Experience the next chapter in this gaming masterpiece. - Prepare to embark on a journey like no other. - - - - {/* Sidebar Info */} - - - Game Info - - - - - Release Date - - {formattedDate} - - - - - - Platforms - - - {game.platforms.map(p => ( - {p} - ))} - - - - - - - ); + console.log('Server Page received slug:', slug); + return ; }