feat: replace text loading messages with PageSpinner component

Add a shared PageSpinner (spinning ring + optional label) and use it
in all pages that previously showed a plain text loading message:
home, stats, player, team, and tournament pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-17 09:54:39 +02:00
parent 0d415baf95
commit c96c683580
6 changed files with 18 additions and 14 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import { use, useEffect } from 'react'
import Link from 'next/link'
import { TeamFlag } from '@/components/team-flag'
import { TrophyIcon } from '@heroicons/react/24/outline'
import { PageSpinner } from '@/components/page-spinner'
const TEAM_QUERY = gql`
query Team($slug: String!) {
@@ -76,7 +77,7 @@ export function TeamClient({ params }: { params: Promise<{ slug: string }> }) {
const years = Object.keys(matchesByYear).map(Number).sort((a, b) => b - a)
if (loading && !teamData) {
return <div className="max-w-[1200px] mx-auto px-7 py-10 text-green-muted">Loading team</div>
return <PageSpinner />
}
if (!team) {