From 93c15443d1baa663f81b36ac347fd9b0ac4333e3 Mon Sep 17 00:00:00 2001 From: Foysal Ahamed Date: Thu, 5 Dec 2024 12:08:23 +0000 Subject: [PATCH] :recycle: Refactor per review feedback --- app/actions/ModActionPanel/BlobList.tsx | 6 +++--- components/common/BlobListLightbox.tsx | 8 -------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/app/actions/ModActionPanel/BlobList.tsx b/app/actions/ModActionPanel/BlobList.tsx index dd772f6..dcda1e3 100644 --- a/app/actions/ModActionPanel/BlobList.tsx +++ b/app/actions/ModActionPanel/BlobList.tsx @@ -19,15 +19,15 @@ export function BlobList(props: { return (
- {!blobs.length ? ( -
No blobs found
- ) : ( + {blobs.length > 0 ? ( setLightboxImageIndex(-1)} /> + ) : ( +
No blobs found
)} {blobs.map((blob, i) => { const { subjectStatus } = blob.moderation ?? {} diff --git a/components/common/BlobListLightbox.tsx b/components/common/BlobListLightbox.tsx index f5fb6c2..e8868a8 100644 --- a/components/common/BlobListLightbox.tsx +++ b/components/common/BlobListLightbox.tsx @@ -52,14 +52,6 @@ export const BlobListLightbox = ({ } } - console.log( - blobs.map((blob) => ({ - src: getBlobUrl({ - cid: blob.cid, - }), - })), - ) - return ( = 0}