"use client"; import { SafeProject } from "@/lib/validators/project"; import { motion } from "framer-motion"; import { BadgeCheck, FileText, Globe, MapPin, Pencil, Tag, } from "lucide-react"; import Link from "next/link"; export default function UserProjectsTable({ projects }: { projects: SafeProject[] }) { const headers = [ { label: "Projet", icon: FileText }, { label: "État", icon: BadgeCheck }, { label: "Monde", icon: Globe }, { label: "Coordonnées", icon: MapPin }, { label: "Tags", icon: Tag }, { label: "Actions", icon: Pencil }, ]; return (

Mes projets

➕ Ajouter un projet
{projects.length === 0 ? (

Vous n’avez encore créé aucun projet.

) : ( {headers.map(({ label, icon: Icon }) => ( ))} {projects.map((p) => ( ))}
{label}
{p.projet} {p.etat} {p.monde} {p.coords ?? "—"}
{p.tags.map((t, i) => ( {t} ))}
Modifier
)}
); }