Add error handling to og/sample
This commit is contained in:
parent
52c9cd3608
commit
808ae9437b
@ -14,16 +14,16 @@ const focal = 90;
|
|||||||
|
|
||||||
export default async function OGOverviewPage() {
|
export default async function OGOverviewPage() {
|
||||||
const [
|
const [
|
||||||
photosBasic,
|
photoBasic,
|
||||||
photosIcon,
|
photoIcon,
|
||||||
photosTag,
|
photosTag,
|
||||||
photosFavs,
|
photosFavs,
|
||||||
photosCamera,
|
photosCamera,
|
||||||
photosSimulation,
|
photosSimulation,
|
||||||
photosFocal,
|
photosFocal,
|
||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
getPhotosCached({ limit: 1 }),
|
getPhotosCached({ limit: 1 }).then(photos => photos[0]),
|
||||||
getPhotosCached({ limit: 1, camera: cameraIcon }),
|
getPhotosCached({ limit: 1, camera: cameraIcon }).then(photos => photos[0]),
|
||||||
getPhotosCached({ limit: 1, tag }),
|
getPhotosCached({ limit: 1, tag }),
|
||||||
getPhotosCached({ limit: 1, tag: TAG_FAVS }),
|
getPhotosCached({ limit: 1, tag: TAG_FAVS }),
|
||||||
getPhotosCached({ limit: 1, camera }),
|
getPhotosCached({ limit: 1, camera }),
|
||||||
@ -31,12 +31,10 @@ export default async function OGOverviewPage() {
|
|||||||
getPhotosCached({ limit: 1, focal }),
|
getPhotosCached({ limit: 1, focal }),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
console.log(photosIcon);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="grid gap-3 grid-cols-2 md:grid-cols-3 lg:grid-cols-4">
|
<div className="grid gap-3 grid-cols-2 md:grid-cols-3 lg:grid-cols-4">
|
||||||
<PhotoOGTile photo={photosBasic[0]} />
|
{photoBasic && <PhotoOGTile photo={photoBasic} />}
|
||||||
<PhotoOGTile photo={photosIcon[0]} />
|
{photoIcon && <PhotoOGTile photo={photoIcon} />}
|
||||||
<TagOGTile tag={tag} photos={photosTag} />
|
<TagOGTile tag={tag} photos={photosTag} />
|
||||||
<TagOGTile tag={TAG_FAVS} photos={photosFavs} />
|
<TagOGTile tag={TAG_FAVS} photos={photosFavs} />
|
||||||
<CameraOGTile camera={camera} photos={photosCamera} />
|
<CameraOGTile camera={camera} photos={photosCamera} />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user