import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react"; import { Document, Link2, More } from "iconsax-react"; import { type FC } from "react"; import { timeAgo } from "../../../../../config/func"; type Props = { title: string; createdAt?: string; type: "file" | "link"; url?: string; onEdit: () => void; onDelete: () => void; }; const AttachmentItem: FC = ({ title, createdAt, type, url, onEdit, onDelete }) => { return (
{type === "file" ? : }
{url ? ( {title} ) : (
{title}
)} {createdAt &&
{timeAgo(createdAt)}
}
); }; export default AttachmentItem;