From 7474f293ab06699c04bb75e6fb2056983f9de4ff Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sat, 22 Feb 2025 14:07:38 -0600 Subject: [PATCH] Create new recipe overlay overview --- app/admin/recipe/page.tsx | 37 +++++++++++++++++++++++++++--- src/photo/PhotoRecipeOverlay.tsx | 39 ++++++++++++++++---------------- 2 files changed, 54 insertions(+), 22 deletions(-) diff --git a/app/admin/recipe/page.tsx b/app/admin/recipe/page.tsx index 8401a97c..2237b8a0 100644 --- a/app/admin/recipe/page.tsx +++ b/app/admin/recipe/page.tsx @@ -1,7 +1,38 @@ import { getPhotos } from '@/photo/db/query'; -import { redirect } from 'next/navigation'; +import PhotoRecipeOverlay from '@/photo/PhotoRecipeOverlay'; export default async function AdminRecipePage() { - const photos = await getPhotos({ limit: 1}); - redirect(`/admin/recipe/${photos[0].id}`); + 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 ( +
+ + + {photos.map(photo => + , + )} +
); } diff --git a/src/photo/PhotoRecipeOverlay.tsx b/src/photo/PhotoRecipeOverlay.tsx index d7b74237..deb1de29 100644 --- a/src/photo/PhotoRecipeOverlay.tsx +++ b/src/photo/PhotoRecipeOverlay.tsx @@ -10,34 +10,35 @@ export default function PhotoRecipeOverlay({ simulation, exposure, iso, + className, }: { - backgroundImageUrl: string + backgroundImageUrl?: string recipe: FujifilmRecipe simulation: FilmSimulation exposure: string iso: string + className?: string }) { return ( -
+
+ {backgroundImageUrl &&}
- -
- -
+
);