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