From 4370603a6e5379d27595b11816c6b2ae50f88f26 Mon Sep 17 00:00:00 2001 From: ralksta Date: Sat, 7 Mar 2026 10:09:26 +0100 Subject: [PATCH] fix: resolve lightbox photo loading issue and fix lint error in vitest.setup.ts --- components/Lightbox.tsx | 2 +- vitest.setup.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/components/Lightbox.tsx b/components/Lightbox.tsx index c72ff26..680e7c0 100644 --- a/components/Lightbox.tsx +++ b/components/Lightbox.tsx @@ -175,8 +175,8 @@ export function Lightbox({ assets, currentIndex, onClose, onNext, onPrev }: Ligh src={current.previewUrl} alt="" draggable={false} - crossOrigin="anonymous" onLoad={() => setImageLoaded(true)} + onError={() => console.error(`[Lightbox] Failed to load image: ${current.previewUrl}`)} /> diff --git a/vitest.setup.ts b/vitest.setup.ts index 9650b65..56fa04a 100644 --- a/vitest.setup.ts +++ b/vitest.setup.ts @@ -1,5 +1,3 @@ -import { vi } from 'vitest'; - // Set mandatory environment variables for all tests process.env.IMMICH_API_URL = 'http://immich.test'; process.env.IMMICH_API_KEY = 'test-key';