@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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "svg.preview.background": "editor"
3
+ }
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
- if (!thumbnails || thumbnails.length === 0) {
3538
- return null;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "3.1.99-beta-attachments",
3
+ "version": "3.1.100-beta-attachments",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",