diff --git a/app/admin/photos/[photoId]/edit/page.tsx b/app/admin/photos/[photoId]/edit/page.tsx index a0b1419a..e81de2c7 100644 --- a/app/admin/photos/[photoId]/edit/page.tsx +++ b/app/admin/photos/[photoId]/edit/page.tsx @@ -1,11 +1,16 @@ import { redirect } from 'next/navigation'; -import { getPhotoNoStore, getUniqueTagsCached } from '@/photo/cache'; +import { + getPhotoNoStore, + getUniqueRecipesCached, + getUniqueTagsCached, +} from '@/photo/cache'; import { PATH_ADMIN } from '@/app/paths'; import PhotoEditPageClient from '@/photo/PhotoEditPageClient'; import { AI_TEXT_GENERATION_ENABLED, BLUR_ENABLED, IS_PREVIEW, + SHOW_RECIPES, } from '@/app/config'; import { blurImageFromUrl, resizeImageFromUrl } from '@/photo/server'; import { getNextImageUrlForManipulation } from '@/platforms/next-image'; @@ -23,6 +28,10 @@ export default async function PhotoEditPage({ const uniqueTags = await getUniqueTagsCached(); + const uniqueRecipes = SHOW_RECIPES + ? await getUniqueRecipesCached() + : []; + const hasAiTextGeneration = AI_TEXT_GENERATION_ENABLED; // Only generate image thumbnails when AI generation is enabled @@ -42,6 +51,7 @@ export default async function PhotoEditPage({ : type === 'textarea' ?