Prevent photo selection in lightboxes

This commit is contained in:
Sam Becker 2025-10-05 10:41:54 -05:00
parent 75c4cd58fa
commit a2a8538948
3 changed files with 5 additions and 2 deletions

View File

@ -32,7 +32,7 @@ export default function SelectPhotosProvider({
useState(false);
const getPhotoGridElements = useCallback(() =>
document.querySelectorAll(`[${DATA_KEY_PHOTO_GRID}]`)
document.querySelectorAll(`[${DATA_KEY_PHOTO_GRID}=true]`)
, []);
useEffect(() => {

View File

@ -23,6 +23,7 @@ export default function PhotoGrid({
staggerOnFirstLoadOnly = true,
additionalTile,
small,
selectable = true,
onLastPhotoVisible,
onAnimationComplete,
...categories
@ -36,6 +37,7 @@ export default function PhotoGrid({
staggerOnFirstLoadOnly?: boolean
additionalTile?: ReactNode
small?: boolean
selectable?: boolean
onLastPhotoVisible?: () => void
onAnimationComplete?: () => void
} & PhotoSetCategory) {
@ -50,7 +52,7 @@ export default function PhotoGrid({
} = useSelectPhotosState();
return (
<div {...{ [DATA_KEY_PHOTO_GRID]: true }}>
<div {...{ [DATA_KEY_PHOTO_GRID]: selectable }}>
<AnimateItems
className={clsx(
'grid',

View File

@ -52,6 +52,7 @@ export default function PhotoLightbox({
<div className="text-dim">{utility.more}</div>
</Link>
: undefined}
selectable={false}
small
/>
</div>