From 2b93dd750ffd47945b526abebf039c5feff53ac2 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 2 Mar 2025 21:41:58 -0600 Subject: [PATCH] Add core recipe page components --- app/admin/recipe/[photoId]/page.tsx | 2 +- app/admin/recipe/page.tsx | 2 +- app/layout.tsx | 2 + app/recipe/[recipe]/page.tsx | 87 ++++++++++ src/app/paths.ts | 17 +- src/camera/PhotoCamera.tsx | 2 + src/components/Modal.tsx | 10 +- src/components/primitives/EntityLink.tsx | 11 +- src/focal/PhotoFocalLength.tsx | 2 + src/photo/PhotoGrid.tsx | 2 + src/photo/PhotoGridContainer.tsx | 3 + src/photo/PhotoLarge.tsx | 6 +- src/photo/PhotoLink.tsx | 3 +- src/photo/PhotoMedium.tsx | 5 +- src/photo/index.ts | 1 + src/recipe/PhotoRecipe.tsx | 48 ++++++ .../PhotoRecipeGrid.tsx} | 11 +- src/recipe/PhotoRecipeOGTile.tsx | 150 ++++++++++++++++++ src/{photo => recipe}/PhotoRecipeOverlay.tsx | 6 +- src/recipe/RecipeHeader.tsx | 54 +++++++ src/recipe/RecipeModal.tsx | 21 +++ src/recipe/RecipeOverview.tsx | 33 ++++ src/recipe/index.ts | 66 ++++++++ src/{photo => recipe}/useRecipeState.ts | 0 src/simulation/PhotoFilmSimulation.tsx | 3 +- src/state/AppState.ts | 3 + src/state/AppStateProvider.tsx | 5 + src/tag/FavsTag.tsx | 2 + src/tag/HiddenTag.tsx | 2 + src/tag/PhotoTag.tsx | 2 + 30 files changed, 531 insertions(+), 30 deletions(-) create mode 100644 app/recipe/[recipe]/page.tsx create mode 100644 src/recipe/PhotoRecipe.tsx rename src/{photo/PhotoRecipe.tsx => recipe/PhotoRecipeGrid.tsx} (94%) create mode 100644 src/recipe/PhotoRecipeOGTile.tsx rename src/{photo => recipe}/PhotoRecipeOverlay.tsx (91%) create mode 100644 src/recipe/RecipeHeader.tsx create mode 100644 src/recipe/RecipeModal.tsx create mode 100644 src/recipe/RecipeOverview.tsx create mode 100644 src/recipe/index.ts rename src/{photo => recipe}/useRecipeState.ts (100%) diff --git a/app/admin/recipe/[photoId]/page.tsx b/app/admin/recipe/[photoId]/page.tsx index 322a140a..f8129146 100644 --- a/app/admin/recipe/[photoId]/page.tsx +++ b/app/admin/recipe/[photoId]/page.tsx @@ -1,6 +1,6 @@ import SiteGrid from '@/components/SiteGrid'; import { getPhoto, getPhotos } from '@/photo/db/query'; -import PhotoRecipeOverlay from '@/photo/PhotoRecipeOverlay'; +import PhotoRecipeOverlay from '@/recipe/PhotoRecipeOverlay'; export default async function AdminRecipePage({ params, diff --git a/app/admin/recipe/page.tsx b/app/admin/recipe/page.tsx index 5329b230..67f01aa4 100644 --- a/app/admin/recipe/page.tsx +++ b/app/admin/recipe/page.tsx @@ -1,5 +1,5 @@ import { getPhoto, getPhotos } from '@/photo/db/query'; -import PhotoRecipeOverlay from '@/photo/PhotoRecipeOverlay'; +import PhotoRecipeOverlay from '@/recipe/PhotoRecipeOverlay'; export default async function AdminRecipePage() { const [ diff --git a/app/layout.tsx b/app/layout.tsx index b4f37c38..60efe2c7 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -22,6 +22,7 @@ import AdminBatchEditPanel from '@/admin/AdminBatchEditPanel'; import ShareModals from '@/share/ShareModals'; import AdminUploadPanel from '@/admin/upload/AdminUploadPanel'; import { revalidatePath } from 'next/cache'; +import RecipeModal from '@/recipe/RecipeModal'; import '../tailwind.css'; @@ -86,6 +87,7 @@ export default function RootLayout({ )}>