import { Suspense } from "react"; import { notFound } from "next/navigation"; import { db } from "@/db"; import { users } from "@/db/schema"; import { eq } from "drizzle-orm"; import { getUserRepositoriesWithStars } from "@/actions/repositories"; import { RepoList } from "@/components/repo-list"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { CalendarDays, GitBranch, MapPin, Link as LinkIcon, Loader2 } from "lucide-react"; import { format } from "date-fns"; import Link from "next/link"; import { GithubIcon, XIcon, LinkedInIcon } from "@/components/icons"; async function RepoSection({ username }: { username: string }) { const repos = await getUserRepositoriesWithStars(username); if (repos.length === 0) { return (

No repositories yet

This user hasn't created any public repositories.

); } return ; } function RepoSkeleton() { return (
{[...Array(3)].map((_, i) => (
))}
); } export default async function ProfilePage({ params }: { params: Promise<{ username: string }> }) { const { username } = await params; const user = await db.query.users.findFirst({ where: eq(users.username, username), }); if (!user) { notFound(); } return (

Repositories

}>
); }