import { Draggable } from "@hello-pangea/dnd"; import { useRedirect } from "ra-core"; import { ReferenceField } from "@/components/ds/admin/reference-field"; import { Card, CardContent } from "@/components/ds/ui/card"; import { CompanyAvatar } from "../companies/CompanyAvatar"; import type { Deal } from "../types"; export const DealCard = ({ deal, index }: { deal: Deal; index: number }) => { if (!deal) return null; return ( {(provided, snapshot) => ( )} ); }; export const DealCardContent = ({ provided, snapshot, deal, }: { provided?: any; snapshot?: any; deal: Deal; }) => { const redirect = useRedirect(); const handleClick = () => { redirect(`/deals/${deal.id}/show`, undefined, undefined, undefined, { _scrollToTop: false, }); }; return (

{deal.name}

{deal.amount.toLocaleString("en-US", { notation: "compact", style: "currency", currency: "USD", currencyDisplay: "narrowSymbol", minimumSignificantDigits: 3, })} {deal.category ? `, ${deal.category}` : ""}

); };