Temporarily remove getStaticParams

This commit is contained in:
Sam Becker 2024-01-22 17:53:29 -06:00
parent b41542797c
commit dcf585b1cf

View File

@ -1,5 +1,4 @@
import {
// GENERATE_STATIC_PARAMS_LIMIT,
GRID_THUMBNAILS_TO_SHOW_MAX,
descriptionForPhoto,
titleForPhoto,
@ -13,12 +12,6 @@ import {
} from '@/site/paths';
import PhotoDetailPage from '@/photo/PhotoDetailPage';
import { getPhotoCached, getPhotosNearIdCached } from '@/cache';
import { getPhotoIds } from '@/services/vercel-postgres';
export async function generateStaticParams() {
const photos = await getPhotoIds({ limit: 10 });
return photos.map(id => ({ photoId: id }));
}
interface PhotoProps {
params: { photoId: string }
@ -69,9 +62,6 @@ export default async function PhotoPage({
const isPhotoFirst = photos.findIndex(p => p.id === photoId) === 0;
// Warm OG image without waiting on response
fetch(absolutePathForPhotoImage(photo));
return <>
{children}
<PhotoDetailPage