Vercel/src/photo/StaggeredOgPhotosInfinite.tsx
Sam Becker 5591635a1e
Next.js 16 (#347)
* Upgrade to Next.js 16, resolve/suppress linting errors

* Update usage of revalidateTag()

* Rename proxy.ts export

* Refactor infinite scroll data handling
2025-10-25 21:35:30 -05:00

29 lines
670 B
TypeScript

'use client';
import { PATH_OG } from '@/app/path';
import InfinitePhotoScroll from './InfinitePhotoScroll';
import StaggeredOgPhotos from './StaggeredOgPhotos';
export default function StaggeredOgPhotosInfinite({
initialOffset,
itemsPerPage,
}: {
initialOffset: number
itemsPerPage: number
}) {
return (
<InfinitePhotoScroll
cacheKey={`page-${PATH_OG}`}
initialOffset={initialOffset}
itemsPerPage={itemsPerPage}
>
{({ key, photos, onLastPhotoVisible }) =>
<StaggeredOgPhotos
key={key}
photos={photos}
onLastPhotoVisible={onLastPhotoVisible}
/>}
</InfinitePhotoScroll>
);
}