diff --git a/src/app/player/[id]/page.tsx b/src/app/player/[id]/page.tsx index 97f5ece..03128a9 100644 --- a/src/app/player/[id]/page.tsx +++ b/src/app/player/[id]/page.tsx @@ -2,6 +2,7 @@ import PlayerPage from "@/components/player/PlayerPage"; import { ssrSettings } from "@/ssrSettings"; import { formatNumber } from "@/utils/number"; import { ScoreSaberAPI } from "@/utils/scoresaber/api"; +import { normalizedRegionName } from "@/utils/utils"; import { Metadata } from "next"; type Props = { @@ -18,20 +19,20 @@ export async function generateMetadata({ }; } - const description = - `View ${player.name}'s scores, top plays, and more. ` + - `Rank: #${player.rank} (#${formatNumber( + const description = ` + View ${player.name}'s scores, top plays, and more. + Rank: #${player.rank} (#${formatNumber( player.countryRank, - )} - ${formatNumber(player.country)}) ` + - `PP: ${player.pp} ` + - `Play Count: ${formatNumber(player.scoreStats.totalPlayCount)}`; + )} - ${normalizedRegionName(player.country)}) + PP: ${player.pp} + Play Count: ${formatNumber(player.scoreStats.totalPlayCount)}`; return { title: `${player.name}`, description: `View ${player.name}'s scores, top plays, and more.`, openGraph: { - type: "article", - title: `${ssrSettings.siteName} - ${player.name}`, + siteName: ssrSettings.siteName, + title: `${player.name}`, description: description, images: [ { @@ -39,6 +40,9 @@ export async function generateMetadata({ }, ], }, + twitter: { + card: "summary", + }, }; }