From bec619e139d19d3b66b9df8e6f32fd8179e30a28 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Tue, 12 Sep 2023 22:09:16 -0500 Subject: [PATCH] Tighten layout gaps, add grid density --- src/app/(static)/page.tsx | 4 ++-- src/photo/PhotoGrid.tsx | 4 ++-- src/photo/index.ts | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/(static)/page.tsx b/src/app/(static)/page.tsx index 82503125..22ccedd0 100644 --- a/src/app/(static)/page.tsx +++ b/src/app/(static)/page.tsx @@ -19,7 +19,7 @@ export default async function HomePage({ }: { searchParams: { next: string }; }) { - const { offset, limit } = getPhotosLimitForQuery(searchParams.next); + const { offset, limit } = getPhotosLimitForQuery(searchParams.next, 12); const photos = await getPhotos(undefined, limit); @@ -31,7 +31,7 @@ export default async function HomePage({ photos.length > 0 ?
{ export const getPhotosLimitForQuery = ( query?: string, - photosPerRequest = PHOTOS_PER_REQUEST, + photosPerRequest = 24, ) => { const offsetInt = parseInt(query ?? '0'); const offset = (Number.isNaN(offsetInt) ? 0 : offsetInt);