fix: remove unused \$name variable from PlayerGoalsByYear query

GraphQL validation rejected the operation because \$name was declared
but never referenced in the query body.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-14 21:41:42 +02:00
parent 0b26c59ceb
commit 1c73baf894
+2 -2
View File
@@ -38,13 +38,13 @@ export default function PlayerPage({ params }: { params: Promise<{ name: string
// Fetch all goals for this player broken down by year // Fetch all goals for this player broken down by year
const { data: goalsData } = useQuery(gql` const { data: goalsData } = useQuery(gql`
query PlayerGoalsByYear($name: String!) { query PlayerGoalsByYear {
tournaments { year } tournaments { year }
topScorers(limit: 1000) { topScorers(limit: 1000) {
playerName goals team { id } playerName goals team { id }
} }
} }
`, { variables: { name } }) `)
if (loading && !data) { if (loading && !data) {
return <div className="max-w-[1200px] mx-auto px-7 py-10 text-[#2a5c35]">Loading player</div> return <div className="max-w-[1200px] mx-auto px-7 py-10 text-[#2a5c35]">Loading player</div>