From ac3b71142e1b2bd947d0991a3565e4dc6b1c5c8e Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 12 May 2024 13:13:48 -0500 Subject: [PATCH] Fix hidden photo page type --- src/app/tag/hidden/[photoId]/page.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/tag/hidden/[photoId]/page.tsx b/src/app/tag/hidden/[photoId]/page.tsx index 0f091c14..5f7e4e91 100644 --- a/src/app/tag/hidden/[photoId]/page.tsx +++ b/src/app/tag/hidden/[photoId]/page.tsx @@ -5,7 +5,7 @@ import { PATH_ROOT, absolutePathForPhoto } from '@/site/paths'; import { TAG_HIDDEN } from '@/tag'; import { Metadata } from 'next'; import { redirect } from 'next/navigation'; -import { ReactNode, cache } from 'react'; +import { cache } from 'react'; const getPhotoCachedCached = cache(getPhotoCached); @@ -40,10 +40,9 @@ export async function generateMetadata({ }; } -export default async function PhotoTagPage({ +export default async function PhotoTagHiddenPage({ params: { photoId }, - children, -}: PhotoTagProps & { children: ReactNode }) { +}: PhotoTagProps) { const photo = await getPhotoCachedCached(photoId, true); if (!photo) { redirect(PATH_ROOT); } @@ -51,8 +50,7 @@ export default async function PhotoTagPage({ const photos = await getPhotosCached({ hidden: 'only' }); const count = photos.length; - return <> - {children} + return ( - ; + ); }