Hide share button for hidden images
This commit is contained in:
parent
9babc102d4
commit
41968fd6de
@ -70,6 +70,7 @@ export default async function PhotoTagHiddenPage({
|
||||
count,
|
||||
dateRange,
|
||||
tag: TAG_HIDDEN,
|
||||
shouldShare: false,
|
||||
}} />
|
||||
);
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@ export default function PhotoDetailPage({
|
||||
indexNumber,
|
||||
count,
|
||||
dateRange,
|
||||
shouldShare,
|
||||
}: {
|
||||
photo: Photo
|
||||
photos: Photo[]
|
||||
@ -36,6 +37,7 @@ export default function PhotoDetailPage({
|
||||
indexNumber?: number
|
||||
count?: number
|
||||
dateRange?: PhotoDateRange
|
||||
shouldShare?: boolean
|
||||
}) {
|
||||
return (
|
||||
<div>
|
||||
@ -110,6 +112,7 @@ export default function PhotoDetailPage({
|
||||
prefetchRelatedLinks
|
||||
showCamera={!camera}
|
||||
showSimulation={!simulation}
|
||||
shouldShare={shouldShare}
|
||||
shouldShareTag={tag !== undefined}
|
||||
shouldShareCamera={camera !== undefined}
|
||||
shouldShareSimulation={simulation !== undefined}
|
||||
|
||||
@ -41,6 +41,7 @@ export default function PhotoLarge({
|
||||
revalidatePhoto,
|
||||
showCamera = true,
|
||||
showSimulation = true,
|
||||
shouldShare = true,
|
||||
shouldShareTag,
|
||||
shouldShareCamera,
|
||||
shouldShareSimulation,
|
||||
@ -56,6 +57,7 @@ export default function PhotoLarge({
|
||||
revalidatePhoto?: RevalidatePhoto
|
||||
showCamera?: boolean
|
||||
showSimulation?: boolean
|
||||
shouldShare?: boolean
|
||||
shouldShareTag?: boolean
|
||||
shouldShareCamera?: boolean
|
||||
shouldShareSimulation?: boolean
|
||||
@ -193,6 +195,7 @@ export default function PhotoLarge({
|
||||
photo={photo}
|
||||
className="text-medium"
|
||||
/>
|
||||
{shouldShare &&
|
||||
<ShareButton
|
||||
className={clsx(
|
||||
'md:translate-x-[-2.5px]',
|
||||
@ -204,11 +207,12 @@ export default function PhotoLarge({
|
||||
camera: shouldShareCamera ? camera : undefined,
|
||||
// eslint-disable-next-line max-len
|
||||
simulation: shouldShareSimulation ? photo.filmSimulation : undefined,
|
||||
// eslint-disable-next-line max-len
|
||||
focal: shouldShareFocalLength ? photo.focalLength : undefined,
|
||||
})}
|
||||
prefetch={prefetchRelatedLinks}
|
||||
shouldScroll={shouldScrollOnShare}
|
||||
/>
|
||||
/>}
|
||||
</div>
|
||||
</div>
|
||||
</DivDebugBaselineGrid>}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user