attachment

This commit is contained in:
hamid zarghami
2026-07-12 12:13:31 +03:30
parent 7c2d6c465e
commit c11c972c7c
9 changed files with 96 additions and 25 deletions
@@ -5,7 +5,7 @@ import { timeAgo } from "../../../../../config/func";
type Props = {
title: string;
createdAt: string;
createdAt?: string;
type: "file" | "link";
url?: string;
onEdit: () => void;
@@ -21,14 +21,14 @@ const AttachmentItem: FC<Props> = ({ title, createdAt, type, url, onEdit, onDele
</div>
<div className="min-w-0">
{type === "link" && url ? (
{url ? (
<a href={url} target="_blank" rel="noopener noreferrer" className="text-xs font-bold text-[#0047FF] underline truncate block">
{title}
</a>
) : (
<div className="text-xs font-bold truncate">{title}</div>
)}
<div className="text-[11px] mt-0.5">{timeAgo(createdAt)}</div>
{createdAt && <div className="text-[11px] mt-0.5">{timeAgo(createdAt)}</div>}
</div>
</div>