pls thumbnail
All checks were successful
deploy / deploy (push) Successful in 53s

This commit is contained in:
Lee 2023-10-23 07:43:31 +01:00
parent 153596fe75
commit 5970126096

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