import { fetchApi } from "@/lib/api"; import { Users, Award, Camera, Clock } from "lucide-react"; interface Contributor { wallet_hash: string; photo_count: number; last_upload: string; } export default async function ContributorsPage() { let contributors: Contributor[] = []; try { const response = await fetchApi('/api/contributors'); contributors = response.contributors; } catch (error) { console.error("Error fetching contributors:", error); } return (

Top Contributeurs

Classement des utilisateurs selon leur contribution à l'entraînement de l'IA.

{/* Stats Summary */}
} /> acc + c.photo_count, 0)} icon={} />
{/* Table */}
{contributors.map((c, index) => ( ))}
Rang Wallet Hash Photos Dernier Upload
{index < 3 ? ( ) : ( #{index + 1} )}
{c.wallet_hash} {c.photo_count} {new Date(c.last_upload).toLocaleString()}
{contributors.length === 0 && (
Aucun contributeur enregistré pour le moment.
)}
); } function StatCard({ title, value, icon }: any) { return (

{title}

{value}

{icon}
); }