From 808ae9437b8a74f976fa730db34720934cb407b4 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sat, 25 May 2024 23:57:35 -0500 Subject: [PATCH] Add error handling to og/sample --- src/app/og/sample/page.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/app/og/sample/page.tsx b/src/app/og/sample/page.tsx index 5f23654d..3c9545a6 100644 --- a/src/app/og/sample/page.tsx +++ b/src/app/og/sample/page.tsx @@ -14,16 +14,16 @@ const focal = 90; export default async function OGOverviewPage() { const [ - photosBasic, - photosIcon, + photoBasic, + photoIcon, photosTag, photosFavs, photosCamera, photosSimulation, photosFocal, ] = await Promise.all([ - getPhotosCached({ limit: 1 }), - getPhotosCached({ limit: 1, camera: cameraIcon }), + getPhotosCached({ limit: 1 }).then(photos => photos[0]), + getPhotosCached({ limit: 1, camera: cameraIcon }).then(photos => photos[0]), getPhotosCached({ limit: 1, tag }), getPhotosCached({ limit: 1, tag: TAG_FAVS }), getPhotosCached({ limit: 1, camera }), @@ -31,12 +31,10 @@ export default async function OGOverviewPage() { getPhotosCached({ limit: 1, focal }), ]); - console.log(photosIcon); - return (
- - + {photoBasic && } + {photoIcon && }