diff --git a/src/components/PopularRankList.tsx b/src/components/PopularRankList.tsx index afd8598..6d0f503 100644 --- a/src/components/PopularRankList.tsx +++ b/src/components/PopularRankList.tsx @@ -1,7 +1,6 @@ import { Archive, Download, - Eye, File, FileText, Image as ImageIcon, @@ -20,9 +19,7 @@ import { resourceTypeLabel } from "../resourceTypeLabels"; import { cleanCategoryDisplayName } from "../utils/categoryDisplay"; import { formatDateYmd } from "../utils/format"; import { postToResource } from "../utils/postResourceAdapter"; -import type { Attachment, Post } from "../types/post"; -import { useLightbox } from "./messageStream/overlays/ImageLightbox"; -import { useVideoPlayer } from "./messageStream/overlays/VideoPlayer"; +import type { Post } from "../types/post"; import { downloadAttachment } from "./messageStream/utils/downloadFile"; import { useToast } from "./Toast"; @@ -94,8 +91,6 @@ function PopularRankRow({ }) { const { t, lang } = useI18n(); const navigate = useNavigate(); - const { openLightbox } = useLightbox(); - const { openVideo } = useVideoPlayer(); const { showToast } = useToast(); const [isDownloading, setIsDownloading] = useState(false); const [coverFailed, setCoverFailed] = useState(false); @@ -104,22 +99,6 @@ function PopularRankRow({ const cover = r.coverImage && !coverFailed ? assetUrl(r.coverImage) : ""; const isTop3 = index < MEDALS.length; - const first: Attachment | undefined = post.attachments[0]; - const imageAttachments = post.attachments.filter((a) => a.kind === "image"); - - const handlePreview = () => { - if (first?.kind === "video") { - openVideo(first); - return; - } - if (imageAttachments.length > 0) { - openLightbox(imageAttachments, 0, r.title, post.id); - return; - } - // Documents / links have no inline overlay — fall through to the detail page. - navigate(`/resource/${post.id}`); - }; - const handleDownload = async () => { if (isDownloading || !r.downloadPostId || !r.downloadAttachmentId) return; setIsDownloading(true); @@ -185,15 +164,6 @@ function PopularRankRow({