import { db } from "@/lib/db"; export default async function LeaderboardPage() { const teams = await db.team.findMany({ where: { status: "ACTIVE" }, orderBy: { totalPoints: "desc" }, include: { user: { select: { name: true, email: true } } }, take: 100, }); return (

🏆 جدول امتیازات

{teams.map((t, i) => ( ))}
رتبه تیم مدیر امتیاز
{i === 0 ? "🥇" : i === 1 ? "🥈" : i === 2 ? "🥉" : i + 1} {t.name} {t.user.name ?? t.user.email} {t.totalPoints}
{teams.length === 0 && (
هنوز تیمی ثبت نشده
)}
); }