diff --git a/frontend/src/components/FileList.tsx b/frontend/src/components/FileList.tsx index c898527..439163b 100644 --- a/frontend/src/components/FileList.tsx +++ b/frontend/src/components/FileList.tsx @@ -1,5 +1,6 @@ -import { useRef } from "react"; +import { useEffect, useRef, useState } from "react"; import { toast } from "sonner"; +import { Eye, Download, Trash2, X, FileText, Image as ImageIcon, ExternalLink } from "lucide-react"; import type { Attachment } from "../lib/types"; export interface FileListProps { @@ -11,12 +12,48 @@ export interface FileListProps { onDelete?: (a: Attachment) => void; // دانلود احراز هویت‌شده (توکن Bearer + blob — لینک خام توکن نمی‌فرستد) onDownload?: (a: Attachment) => void | Promise; + // آدرس blob احراز هویت‌شده برای پیش‌نمایش. مودال پیش‌نمایش با objectURL + // محلی کار می‌کند چون /