import { prisma } from "@/lib/db"; import Link from "next/link"; export const dynamic = "force-dynamic"; export default async function ResumesPage() { const resumes = await prisma.resume.findMany({ orderBy: { updatedAt: "desc" }, include: { job: { select: { id: true, title: true, company: true } } }, }); return (
{/* Header */}

Resumes

{resumes.length} {resumes.length === 1 ? "version" : "versions"}

Tailored resumes customized by AI for specific positions and target roles.

Browse Jobs Pipeline
{/* Resumes Grid / Empty State */} {resumes.length === 0 ? (

No tailored resumes yet

Open any job in your tracker and click “AI Tailor Resume” to generate a custom CV version optimized for that role.

Go to Jobs Pipeline
) : (
{resumes.map((r) => (
{/* Stylized Document Thumbnail Placeholder */}
{/* Header bar simulations */}
{/* Section 1 */}
{/* Section 2 */}
{/* Resume Label & Version Tag */}
{r.name} {r.kind} · v{r.version}
{/* Linked Job Title + Company */}
{r.job ? (
Target Role: {r.job.company} — {r.job.title}
) : ( General master resume )}
{/* Bottom Row: Timestamp + Open Button */}
{new Date(r.updatedAt).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric", })} Open
))}
)}
); }