attachment
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user