import { Metadata } from "next"; import { Header } from "@/components/header"; import { Card, CardContent } from "@/components/ui/card"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; import { ExternalLink } from "lucide-react"; import Link from "next/link"; import { GithubIcon } from "@/components/icons"; import { Badge } from "@/components/ui/badge"; export const metadata: Metadata = { title: "Contributors - OpenCut", description: "Meet the amazing people who contribute to OpenCut, the free and open-source video editor.", openGraph: { title: "Contributors - OpenCut", description: "Meet the amazing people who contribute to OpenCut, the free and open-source video editor.", type: "website", }, }; interface Contributor { id: number; login: string; avatar_url: string; html_url: string; contributions: number; type: string; } async function getContributors(): Promise { try { const response = await fetch( "https://api.github.com/repos/OpenCut-app/OpenCut/contributors", { headers: { Accept: "application/vnd.github.v3+json", "User-Agent": "OpenCut-Web-App", }, next: { revalidate: 600 }, // 10 minutes } ); if (!response.ok) { console.error("Failed to fetch contributors"); return []; } const contributors = await response.json(); const filteredContributors = contributors.filter( (contributor: Contributor) => contributor.type === "User" ); return filteredContributors; } catch (error) { console.error("Error fetching contributors:", error); return []; } } export default async function ContributorsPage() { const contributors = await getContributors(); const topContributors = contributors.slice(0, 2); const otherContributors = contributors.slice(2); return (
Open Source

Contributors

Meet the amazing developers who are building the future of video editing

{contributors.length} contributors
{contributors.reduce((sum, c) => sum + c.contributions, 0)} contributions
{topContributors.length > 0 && (

Top Contributors

Leading the way in contributions

{topContributors.map((contributor, index) => (
{contributor.login.charAt(0).toUpperCase()}
{index + 1}

{contributor.login}

{contributor.contributions} contributions
))}
)} {otherContributors.length > 0 && (

All Contributors

Everyone who makes OpenCut better

{otherContributors.map((contributor, index) => (
{contributor.login.charAt(0).toUpperCase()}

{contributor.login}

{contributor.contributions}

))}
)} {contributors.length === 0 && (

No contributors found

Unable to load contributors at the moment. Check back later or view on GitHub.

)}

Join the community

OpenCut is built by developers like you. Every contribution, no matter how small, helps make video editing more accessible for everyone.

); }