import NavigationWrapper from "@/components/navigation/NavigationWrapper";
import LeaderboardSection from "@/components/leaderboard/LeaderboardSection";
import { userStatsService } from "@/services/users/user-stats.service";
import { getBackgroundImage } from "@/lib/preferences";

export const dynamic = "force-dynamic";

export default async function LeaderboardPage() {
  const leaderboard = await userStatsService.getLeaderboard(10);

  const backgroundImage = await getBackgroundImage(
    "leaderboard",
    "/leaderboard-bg.jpg"
  );

  return (
    <main className="min-h-screen bg-black relative">
      <NavigationWrapper />
      <LeaderboardSection
        leaderboard={leaderboard}
        backgroundImage={backgroundImage}
      />
    </main>
  );
}
