"use client"; interface LeaderboardEntry { rank: number; username: string; score: number; level: number; avatar?: string; } // Format number with consistent locale to avoid hydration mismatch const formatScore = (score: number): string => { return score.toLocaleString("en-US"); }; const mockLeaderboard: LeaderboardEntry[] = [ { rank: 1, username: "TechMaster2024", score: 125000, level: 85 }, { rank: 2, username: "CodeWarrior", score: 118500, level: 82 }, { rank: 3, username: "AIGenius", score: 112000, level: 80 }, { rank: 4, username: "DevLegend", score: 105500, level: 78 }, { rank: 5, username: "InnovationPro", score: 99000, level: 75 }, { rank: 6, username: "TechNinja", score: 92500, level: 73 }, { rank: 7, username: "DigitalHero", score: 87000, level: 71 }, { rank: 8, username: "CodeCrusher", score: 81500, level: 69 }, { rank: 9, username: "TechWizard", score: 76000, level: 67 }, { rank: 10, username: "InnovationKing", score: 70500, level: 65 }, { rank: 11, username: "DevMaster", score: 68000, level: 64 }, { rank: 12, username: "TechElite", score: 65500, level: 63 }, { rank: 13, username: "CodeChampion", score: 63000, level: 62 }, { rank: 14, username: "AIVisionary", score: 60500, level: 61 }, { rank: 15, username: "TechPioneer", score: 58000, level: 60 }, ]; export default function LeaderboardSection() { return (
{/* Background Image */}
{/* Dark overlay for readability */}
{/* Content */}
{/* Title Section */}

LEADERBOARD

Top Players
{/* Leaderboard Table */}
{/* Header */}
Rank
Player
Score
Level
{/* Entries */}
{mockLeaderboard.map((entry) => (
{/* Rank */}
{entry.rank}
{/* Player */}
{entry.username.charAt(0).toUpperCase()}
{entry.username} {entry.rank <= 3 && ( )}
{/* Score */}
{formatScore(entry.score)}
{/* Level */}
Lv.{entry.level}
))}
{/* Footer Info */}

Compete with players worldwide and climb the ranks!

Rankings update every hour

); }