Add revalidation config to homepage

This commit is contained in:
Sam Becker 2024-01-13 22:47:50 -06:00
parent 8213a8f3dc
commit f97ef4eecd
2 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,8 @@ import MoreComponents from '@/components/MoreComponents';
import PhotosLarge from '@/photo/PhotosLarge';
import { Suspense } from 'react';
export const revalidate = 30;
export async function generateMetadata(): Promise<Metadata> {
// Make homepage queries resilient to error on first time setup
const photos = await getPhotosCached({ limit: MAX_PHOTOS_TO_SHOW_OG })

View File

@ -17,7 +17,7 @@ export default function MoreComponents({
triggerOnView?: boolean
prefetch?: boolean
}) {
const [offset, setOffset] = useState(1);
const [offset, setOffset] = useState(2);
const [components, setComponents] = useState<JSX.Element[]>([]);
const [isLoading, setIsLoading] = useState(false);