diff --git a/src/app/page.tsx b/src/app/page.tsx index 6bd2d8bf..108b2390 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,6 +1,6 @@ import { getPhotosCached, getPhotosCountCached } from '@/photo/cache'; import { - INFINITE_SCROLL_MULTIPLE_ROOT, + INFINITE_SCROLL_MULTIPLE_HOME, generateOgImageMetaForPhotos, } from '@/photo'; import PhotosEmptyState from '@/photo/PhotosEmptyState'; @@ -25,7 +25,7 @@ export default async function HomePage() { count, ] = await Promise.all([ // Make homepage queries resilient to error on first time setup - getPhotosCached({ limit: INFINITE_SCROLL_MULTIPLE_ROOT }).catch(() => []), + getPhotosCached({ limit: INFINITE_SCROLL_MULTIPLE_HOME }).catch(() => []), getPhotosCountCached().catch(() => 0), ]); @@ -35,8 +35,8 @@ export default async function HomePage() { diff --git a/src/photo/index.ts b/src/photo/index.ts index 8f0f135c..680221cc 100644 --- a/src/photo/index.ts +++ b/src/photo/index.ts @@ -14,7 +14,7 @@ import type { Metadata } from 'next'; export const GENERATE_STATIC_PARAMS_LIMIT = 1000; -export const INFINITE_SCROLL_MULTIPLE_ROOT = +export const INFINITE_SCROLL_MULTIPLE_HOME = process.env.NODE_ENV === 'development' ? 2 : 12; export const INFINITE_SCROLL_MULTIPLE_GRID = HIGH_DENSITY_GRID ? process.env.NODE_ENV === 'development' ? 4 : 20