Vercel/app/admin/recipe/page.tsx
2025-02-22 14:07:38 -06:00

39 lines
1.2 KiB
TypeScript

import { getPhotos } from '@/photo/db/query';
import PhotoRecipeOverlay from '@/photo/PhotoRecipeOverlay';
export default async function AdminRecipePage() {
const photos = await getPhotos({ tag: 'favs', limit: 4});
const photosHidden = await getPhotos({ hidden: 'only', limit: 1 });
const { filmSimulation } = photosHidden[0];
const { fujifilmRecipe } = photosHidden[0];
return (
<div className="grid grid-cols-3 gap-1 w-full">
<PhotoRecipeOverlay
key="black"
className="bg-black"
recipe={fujifilmRecipe!}
simulation={filmSimulation!}
exposure="+0ev"
iso="ISO 0"
/>
<PhotoRecipeOverlay
key="white"
className="bg-white"
recipe={fujifilmRecipe!}
simulation={filmSimulation!}
exposure="+0ev"
iso="ISO 0"
/>
{photos.map(photo =>
<PhotoRecipeOverlay
key={photo.id}
backgroundImageUrl={photo.url}
recipe={fujifilmRecipe!}
simulation={filmSimulation!}
exposure={photo.exposureCompensationFormatted ?? '+0ev'}
iso={photo.isoFormatted ?? 'ISO 0'}
/>,
)}
</div>);
}