Add revalidate config to /grid

This commit is contained in:
Sam Becker 2024-01-18 15:05:46 -06:00
parent 19965a1aea
commit 82a55ae3d1
2 changed files with 8 additions and 2 deletions

View File

@ -13,6 +13,8 @@ import { getPhotoSidebarDataCached } from '@/photo/data';
import { MorePhotosGrid } from '@/photo/MorePhotosGrid';
import { Suspense } from 'react';
export const revalidate = 3600;
export async function generateMetadata(): Promise<Metadata> {
const photos = await getPhotosCached({ limit: MAX_PHOTOS_TO_SHOW_OG });
return generateOgImageMetaForPhotos(photos);
@ -53,6 +55,8 @@ export default async function GridPage() {
</div>}
sideHiddenOnMobile
/>
: <PhotosEmptyState />
: <Suspense>
<PhotosEmptyState />
</Suspense>
);
}

View File

@ -41,6 +41,8 @@ export default async function HomePage() {
/>
</Suspense>
</div>
: <PhotosEmptyState />
: <Suspense>
<PhotosEmptyState />
</Suspense>
);
}