From 531d4efcb5f7905fa26e982f34343f558a4b6d06 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Mon, 3 Feb 2025 08:56:04 -0600 Subject: [PATCH] Update infinite scroll for db optimize configuration --- src/photo/InfinitePhotoScroll.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/photo/InfinitePhotoScroll.tsx b/src/photo/InfinitePhotoScroll.tsx index ea8cfdbf..a42d41bf 100644 --- a/src/photo/InfinitePhotoScroll.tsx +++ b/src/photo/InfinitePhotoScroll.tsx @@ -129,7 +129,9 @@ export default function InfinitePhotoScroll({ } as any), [data, mutate]); useVisible({ ref: buttonContainerRef, onVisible: () => { - if (size === 0) { advance(); } + if (ADMIN_DB_OPTIMIZE_ENABLED && size === 0) { + advance(); + } }}); const renderMoreButton = () =>