Reintroduce generateStaticParams
This commit is contained in:
parent
900d21b5a4
commit
fae1dcb81f
@ -1,4 +1,5 @@
|
||||
import {
|
||||
GENERATE_STATIC_PARAMS_LIMIT,
|
||||
GRID_THUMBNAILS_TO_SHOW_MAX,
|
||||
descriptionForPhoto,
|
||||
titleForPhoto,
|
||||
@ -12,6 +13,14 @@ import {
|
||||
} from '@/site/paths';
|
||||
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
||||
import { getPhotosNearIdCached } from '@/cache';
|
||||
import { getPhotoIds } from '@/services/vercel-postgres';
|
||||
|
||||
export async function generateStaticParams() {
|
||||
const photos = await getPhotoIds({ limit: GENERATE_STATIC_PARAMS_LIMIT });
|
||||
return photos.map(photoId => ({
|
||||
params: { photoId },
|
||||
}));
|
||||
}
|
||||
|
||||
interface PhotoProps {
|
||||
params: { photoId: string }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user