From c014f907730868a2c22bf4fa2b9874dc66ac81fb Mon Sep 17 00:00:00 2001 From: itqop Date: Tue, 30 Dec 2025 18:17:41 +0300 Subject: [PATCH] add previw --- frontend/src/components/MediaCard.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/MediaCard.tsx b/frontend/src/components/MediaCard.tsx index 3622d59..4ab42ff 100644 --- a/frontend/src/components/MediaCard.tsx +++ b/frontend/src/components/MediaCard.tsx @@ -38,11 +38,9 @@ export default function MediaCard({ asset, selected, onSelect, onClick }: MediaC setError(false); // Load media through backend proxy with auth const kind = asset.storage_key_thumb ? 'thumb' : 'original'; - if (asset.type === 'photo' || asset.storage_key_thumb) { - const blob = await api.getMediaBlob(asset.id, kind); - const url = URL.createObjectURL(blob); - setThumbnailUrl(url); - } + const blob = await api.getMediaBlob(asset.id, kind); + const url = URL.createObjectURL(blob); + setThumbnailUrl(url); } catch (err) { console.error('Failed to load thumbnail:', err); setError(true);