diff --git a/src/photo/InfinitePhotoScroll.tsx b/src/photo/InfinitePhotoScroll.tsx index 4953645a..eab5c664 100644 --- a/src/photo/InfinitePhotoScroll.tsx +++ b/src/photo/InfinitePhotoScroll.tsx @@ -31,7 +31,7 @@ export default function InfinitePhotoScroll({ triggerOnView?: boolean debug?: boolean }) { - const { swrTimestamp } = useAppState(); + const { swrTimestamp, isUserSignedIn } = useAppState(); const key = `${swrTimestamp}-${type}`; @@ -52,7 +52,12 @@ export default function InfinitePhotoScroll({ useSwrInfinite( keyGenerator, fetcher, - { revalidateFirstPage: false }, + { + revalidateFirstPage: Boolean(isUserSignedIn), + revalidateOnMount: Boolean(isUserSignedIn), + revalidateOnFocus: Boolean(isUserSignedIn), + revalidateOnReconnect: Boolean(isUserSignedIn), + }, ); const buttonContainerRef = useRef(null);