diff --git a/src/app/grid/page.tsx b/src/app/grid/page.tsx
index b9c8258c..3a52c212 100644
--- a/src/app/grid/page.tsx
+++ b/src/app/grid/page.tsx
@@ -38,6 +38,7 @@ export default async function GridPage() {
{photos.length >= INFINITE_SCROLL_MULTIPLE_GRID &&
{photos.length >= INFINITE_SCROLL_MULTIPLE_HOME &&
}
diff --git a/src/photo/InfinitePhotoScroll.tsx b/src/photo/InfinitePhotoScroll.tsx
index 897ac6de..a478e2ca 100644
--- a/src/photo/InfinitePhotoScroll.tsx
+++ b/src/photo/InfinitePhotoScroll.tsx
@@ -17,12 +17,14 @@ export type RevalidatePhoto = (
) => Promise;
export default function InfinitePhotoScroll({
+ swrKey,
type = 'full-frame',
initialOffset = 0,
itemsPerPage = 12,
prefetch = true,
triggerOnView = true,
}: {
+ swrKey: string
type?: 'full-frame' | 'grid'
initialOffset?: number
itemsPerPage?: number
@@ -30,7 +32,7 @@ export default function InfinitePhotoScroll({
triggerOnView?: boolean
debug?: boolean
}) {
- const key = type;
+ const key = `${swrKey}-${type}`;
const buttonContainerRef = useRef(null);