2026-06-15 20:18:36 +02:00
|
|
|
import type { Metadata } from 'next'
|
|
|
|
|
import { PlayerClient } from './client'
|
2026-06-14 15:36:44 +02:00
|
|
|
|
2026-06-15 20:18:36 +02:00
|
|
|
type Props = { params: Promise<{ name: string }> }
|
2026-06-14 15:36:44 +02:00
|
|
|
|
2026-06-15 20:18:36 +02:00
|
|
|
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
|
|
|
|
const { name: encodedName } = await params
|
2026-06-14 15:36:44 +02:00
|
|
|
const name = decodeURIComponent(encodedName)
|
2026-06-15 20:18:36 +02:00
|
|
|
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}` },
|
2026-06-14 15:36:44 +02:00
|
|
|
}
|
2026-06-15 20:18:36 +02:00
|
|
|
}
|
2026-06-14 15:36:44 +02:00
|
|
|
|
2026-06-15 20:18:36 +02:00
|
|
|
export default function PlayerPage({ params }: Props) {
|
|
|
|
|
return <PlayerClient params={params} />
|
2026-06-14 15:36:44 +02:00
|
|
|
}
|