import { gitContributors } from "@/client"; import type { ContributorStats } from "@/client"; import { RepoHeader } from "@/components/repository/header"; import { useQuery } from "@tanstack/react-query"; import { Hash, Loader2, Mail, Calendar } from "lucide-react"; import { useParams } from "react-router-dom"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; function formatDate(ts: number | null | undefined): string { if (!ts) return "—"; return new Date(ts * 1000).toLocaleDateString(undefined, { year: "numeric", month: "short", day: "numeric", }); } function ContributorCard({ c }: { c: ContributorStats }) { const initials = c.name ? c.name .split(/\s+/) .slice(0, 2) .map((p) => p[0]) .join("") .toUpperCase() : c.email[0].toUpperCase(); return (
{c.name || "—"}
{total} contributor{total !== 1 ? "s" : ""} — sorted by commit count
No contributors found
This repository has no commits yet.