a494c80a76
- Split all page.tsx files into server wrapper (metadata export) + client.tsx (Apollo/interactive) - Add robots.ts and sitemap.ts (tournaments, teams, players) - Add metadataBase, OpenGraph and Twitter card metadata to root layout - Replace hardcoded worldcup.pivoine.art with NEXT_PUBLIC_SITE_URL env var (sitemap/robots) and relative paths (page metadata, resolved by Next.js against metadataBase) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
687 B
TypeScript
21 lines
687 B
TypeScript
import type { Metadata } from 'next'
|
|
import { PlayerClient } from './client'
|
|
|
|
type Props = { params: Promise<{ name: string }> }
|
|
|
|
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
|
const { name: encodedName } = await params
|
|
const name = decodeURIComponent(encodedName)
|
|
const title = `${name} — World Cup Goals & Stats`
|
|
const description = `${name}'s FIFA World Cup career: goals by tournament, match history and career statistics.`
|
|
return {
|
|
title,
|
|
description,
|
|
openGraph: { title, description, url: `/players/${encodedName}` },
|
|
}
|
|
}
|
|
|
|
export default function PlayerPage({ params }: Props) {
|
|
return <PlayerClient params={params} />
|
|
}
|