diff --git a/src/photo/PhotoDetailPage.tsx b/src/photo/PhotoDetailPage.tsx index ed70dec8..fb16f223 100644 --- a/src/photo/PhotoDetailPage.tsx +++ b/src/photo/PhotoDetailPage.tsx @@ -3,8 +3,7 @@ import { Photo, PhotoDateRange } from '.'; import PhotoLarge from './PhotoLarge'; import SiteGrid from '@/components/SiteGrid'; import PhotoGrid from './PhotoGrid'; -import { clsx } from 'clsx/lite'; -import PhotoLinks from './PhotoLinks'; +import PhotoNav from './PhotoNav'; import TagHeader from '@/tag/TagHeader'; import { Camera } from '@/camera'; import CameraHeader from '@/camera/CameraHeader'; @@ -102,6 +101,24 @@ export default function PhotoDetailPage({ dateRange={dateRange} />} />} + } + />, + ]} + /> } - contentSide={ - - , - ]} - />} /> ); diff --git a/src/photo/PhotoLarge.tsx b/src/photo/PhotoLarge.tsx index cda6ac5b..cba780a9 100644 --- a/src/photo/PhotoLarge.tsx +++ b/src/photo/PhotoLarge.tsx @@ -38,11 +38,13 @@ import { useAppState } from '@/state/AppState'; export default function PhotoLarge({ photo, + className, primaryTag, priority, prefetch = SHOULD_PREFETCH_ALL_LINKS, prefetchRelatedLinks = SHOULD_PREFETCH_ALL_LINKS, revalidatePhoto, + showTitle = true, showCamera = true, showSimulation = true, shouldShare = true, @@ -55,11 +57,13 @@ export default function PhotoLarge({ onVisible, }: { photo: Photo + className?: string primaryTag?: string priority?: boolean prefetch?: boolean prefetchRelatedLinks?: boolean revalidatePhoto?: RevalidatePhoto + showTitle?: boolean showCamera?: boolean showSimulation?: boolean shouldShare?: boolean @@ -85,10 +89,14 @@ export default function PhotoLarge({ const { arePhotosMatted, isUserSignedIn } = useAppState(); + const hasTitle = showTitle && ( + Boolean(photo.title) || + SHOW_PHOTO_TITLE_FALLBACK_TEXT + ); + const hasTitleContent = - photo.title || - SHOW_PHOTO_TITLE_FALLBACK_TEXT || - photo.caption; + hasTitle || + Boolean(photo.caption); const hasMetaContent = showCameraContent || @@ -102,6 +110,7 @@ export default function PhotoLarge({ return ( - {(photo.title || SHOW_PHOTO_TITLE_FALLBACK_TEXT) && + {hasTitle && + - PREV + + + PREV + + + {(photo.title || SHOW_PHOTO_TITLE_FALLBACK_TEXT) && + } + - NEXT + + NEXT + + - > + ); };