Only debug one fallback per page

This commit is contained in:
Sam Becker 2025-06-24 20:14:16 -05:00
parent b21aa5f882
commit 9f48894225
2 changed files with 4 additions and 1 deletions

View File

@ -9,12 +9,14 @@ export default function PhotosLarge({
prefetchFirstPhotoLinks,
onLastPhotoVisible,
revalidatePhoto,
debugImageFallback = true,
}: {
photos: Photo[]
animate?: boolean
prefetchFirstPhotoLinks?: boolean
onLastPhotoVisible?: () => void
revalidatePhoto?: RevalidatePhoto
debugImageFallback?: boolean
}) {
return (
<AnimateItems
@ -35,7 +37,7 @@ export default function PhotosLarge({
onVisible={index === photos.length - 1
? onLastPhotoVisible
: undefined}
debugImageFallback={index === 0}
debugImageFallback={debugImageFallback && index === 0}
/>)}
itemKeys={photos.map(photo => photo.id)}
/>

View File

@ -23,6 +23,7 @@ export default function PhotosLargeInfinite({
photos={photos}
onLastPhotoVisible={onLastPhotoVisible}
revalidatePhoto={revalidatePhoto}
debugImageFallback={false}
/>}
</InfinitePhotoScroll>
);