@appquality/unguess-design-system 3.1.99-beta-attachments → 3.1.100-beta-attachments
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +3 -0
- package/build/index.js +4 -8
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -3534,19 +3534,15 @@ const Col = (props) => jsxRuntime.jsx(StyledCol$1, Object.assign({}, props));
|
|
|
3534
3534
|
|
|
3535
3535
|
const ThumbnailContainer = ({ openLightbox }) => {
|
|
3536
3536
|
const { thumbnails, removeThumbnail, onDeleteThumbnail } = useChatContext();
|
|
3537
|
-
|
|
3538
|
-
return
|
|
3539
|
-
}
|
|
3540
|
-
const mediaFiles = [];
|
|
3541
|
-
thumbnails.forEach((file) => {
|
|
3542
|
-
mediaFiles.push({
|
|
3537
|
+
const mediaFiles = React.useMemo(() => {
|
|
3538
|
+
return thumbnails.map((file) => ({
|
|
3543
3539
|
fileName: file.name,
|
|
3544
3540
|
fileType: file.type,
|
|
3545
3541
|
previewUrl: URL.createObjectURL(file),
|
|
3546
3542
|
internal_id: file.internal_id,
|
|
3547
3543
|
isLoadingMedia: file.isLoadingMedia,
|
|
3548
|
-
});
|
|
3549
|
-
});
|
|
3544
|
+
}));
|
|
3545
|
+
}, [thumbnails]);
|
|
3550
3546
|
if (!mediaFiles || mediaFiles.length === 0) {
|
|
3551
3547
|
return null;
|
|
3552
3548
|
}
|