import { format } from "date-fns"; import { Waypoints } from "lucide-react"; import Link from "next/link"; import { Button, type ButtonProps } from "~/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "~/components/ui/dialog"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "~/components/ui/table"; import { UserAvatar } from "~/components/user_avatar"; import { cn } from "~/lib/utils"; import type { AnnunciId } from "~/schemas/public/Annunci"; import { api } from "~/utils/api"; export const IncrociDialog = ({ annuncioId, props, }: { annuncioId: AnnunciId; props?: ButtonProps; }) => { return ( Lista Incroci Lista utenti che hanno ricevuto i contatti di questo annuncio ); }; const IncrociTable = ({ annuncioId }: { annuncioId: AnnunciId }) => { const { data: incroci, isLoading } = api.annunci.getIncrociAnnuncio.useQuery({ annuncioId, }); return ( Utente Data Note {isLoading ? (

Caricamento...

) : ( incroci?.map((incrocio) => ( {incrocio.username}

Aggiunto: {format(incrocio.created_at, "dd/MM/yyyy HH:mm")}

Aperto:{" "} {incrocio.open_contatti_at ? format(incrocio.open_contatti_at, "dd/MM/yyyy HH:mm") : "Non aperto"}

{incrocio.note}
)) )}
); };