diff --git a/src/static/PhotoComponent.tsx b/src/static/PhotoComponent.tsx index 8315a5b..2dd4a02 100644 --- a/src/static/PhotoComponent.tsx +++ b/src/static/PhotoComponent.tsx @@ -38,7 +38,7 @@ function PhotoComponent( }: PhotoComponentProps, ref: ForwardedRef, ) { - const { src, alt, title, href } = photo; + const { href } = photo; const context = { photo, index, width: round(width, 3), height: round(height, 3) }; @@ -57,7 +57,7 @@ function PhotoComponent( variables={{ photoWidth: context.width, photoHeight: context.height }} {...{ context, ...props }} > - + {extras?.({}, context)} ); diff --git a/src/static/StaticPhotoAlbum.tsx b/src/static/StaticPhotoAlbum.tsx index f55304b..6b3728a 100644 --- a/src/static/StaticPhotoAlbum.tsx +++ b/src/static/StaticPhotoAlbum.tsx @@ -65,6 +65,7 @@ function StaticPhotoAlbum( > {photos.map((context) => { const { photo, index, width } = context; + const { key, src, alt, title, label } = photo; const onClick = onClickCallback ? (event: React.MouseEvent) => { @@ -78,18 +79,22 @@ function StaticPhotoAlbum( } const ariaLabel = (props: T) => { - return photo.label ? { "aria-label": photo.label, ...props } : props; + return label ? { "aria-label": label, ...props } : props; }; return (