Skip to content

Commit 4a00e5c

Browse files
authored
Merge pull request #795 from GetStream/fix-image-attachment-bugs
Fix image attachment bugs
2 parents 5f5b8de + d9d10bd commit 4a00e5c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/components/Gallery/Gallery.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const UnMemoizedGallery = <
3939
() =>
4040
images.map((image) => ({
4141
source: image.image_url || image.thumb_url || '',
42-
src: image.image_url || image.thumb_url || '',
4342
})),
4443
[images],
4544
);
@@ -81,7 +80,7 @@ const UnMemoizedGallery = <
8180
images={formattedArray}
8281
index={index}
8382
modalIsOpen={modalOpen}
84-
toggleModal={() => toggleModal}
83+
toggleModal={() => setModalOpen(!modalOpen)}
8584
/>
8685
</div>
8786
);

src/components/Gallery/ModalImage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import React from 'react';
55
*/
66
export type ModalImageProps = {
77
/** The src attribute for the image element */
8-
data: { src: string };
8+
data: { source: string };
99
};
1010

1111
export const ModalImage: React.FC<ModalImageProps> = (props) => {
1212
const { data } = props;
1313
return (
1414
<div className='str-chat__modal-image__wrapper' data-testid='modal-image'>
15-
<img className='str-chat__modal-image__image' src={data.src} />
15+
<img className='str-chat__modal-image__image' src={data.source} />
1616
</div>
1717
);
1818
};

0 commit comments

Comments
 (0)