Temporarily remove getStaticParams
This commit is contained in:
parent
b41542797c
commit
dcf585b1cf
@ -1,5 +1,4 @@
|
|||||||
import {
|
import {
|
||||||
// GENERATE_STATIC_PARAMS_LIMIT,
|
|
||||||
GRID_THUMBNAILS_TO_SHOW_MAX,
|
GRID_THUMBNAILS_TO_SHOW_MAX,
|
||||||
descriptionForPhoto,
|
descriptionForPhoto,
|
||||||
titleForPhoto,
|
titleForPhoto,
|
||||||
@ -13,12 +12,6 @@ import {
|
|||||||
} from '@/site/paths';
|
} from '@/site/paths';
|
||||||
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
||||||
import { getPhotoCached, getPhotosNearIdCached } from '@/cache';
|
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 {
|
interface PhotoProps {
|
||||||
params: { photoId: string }
|
params: { photoId: string }
|
||||||
@ -69,9 +62,6 @@ export default async function PhotoPage({
|
|||||||
|
|
||||||
const isPhotoFirst = photos.findIndex(p => p.id === photoId) === 0;
|
const isPhotoFirst = photos.findIndex(p => p.id === photoId) === 0;
|
||||||
|
|
||||||
// Warm OG image without waiting on response
|
|
||||||
fetch(absolutePathForPhotoImage(photo));
|
|
||||||
|
|
||||||
return <>
|
return <>
|
||||||
{children}
|
{children}
|
||||||
<PhotoDetailPage
|
<PhotoDetailPage
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user