diff --git a/app/src/pages/Editor/components/SlotInformationModa.tsx b/app/src/pages/Editor/components/SlotInformationModa.tsx
index 3c94ab5..59d9bd1 100644
--- a/app/src/pages/Editor/components/SlotInformationModa.tsx
+++ b/app/src/pages/Editor/components/SlotInformationModa.tsx
@@ -1,3 +1,4 @@
+import { useMetagalleryStore } from "@/providers/MetagalleryProvider";
import { useEditorStore } from "@/stores/editorAction";
import { useUser } from "@/stores/useUser";
import { Button, TextInput } from "@mantine/core";
@@ -7,12 +8,13 @@ import { useMutation, useQueryClient } from "@tanstack/react-query";
import { mutate } from "swr";
type SlotInformationModalProps = {
+ id: string;
title: string;
description: string;
slotRef: string;
}
-export const SlotInformationModal = ({ title, description, slotRef }: SlotInformationModalProps) => {
+export const SlotInformationModal = ({ id, title, description, slotRef }: SlotInformationModalProps) => {
const gallery = useEditorStore((s) => s.gallery);
const queryClient = useQueryClient();
@@ -38,6 +40,7 @@ export const SlotInformationModal = ({ title, description, slotRef }: SlotInform
console.log('File uploaded');
queryClient.invalidateQueries({ queryKey: ['user/media'] });
mutate(`/gallery/${gallery}`);
+ useMetagalleryStore.getState().closeModal(id);
},
onError: (error) => {
console.error('Error uploading file', error);
@@ -67,14 +70,12 @@ export const SlotInformationModal = ({ title, description, slotRef }: SlotInform
diff --git a/app/src/pages/Editor/components/blocks/Model3DBlock.tsx b/app/src/pages/Editor/components/blocks/Model3DBlock.tsx
index 17411f6..e7488f2 100644
--- a/app/src/pages/Editor/components/blocks/Model3DBlock.tsx
+++ b/app/src/pages/Editor/components/blocks/Model3DBlock.tsx
@@ -107,6 +107,7 @@ export const Model3DSlot = memo(({ idRef, v, res, props, title, description }: M
id: 'picture-slot-modal',
child: (
);
}, (prev, next) => {
- return prev.res === next.res;
+ return prev.res === next.res && prev.title === next.title && prev.description === next.description;
});
diff --git a/app/src/pages/Editor/components/blocks/PictureSlot.tsx b/app/src/pages/Editor/components/blocks/PictureSlot.tsx
index 177d167..ac6d7f1 100644
--- a/app/src/pages/Editor/components/blocks/PictureSlot.tsx
+++ b/app/src/pages/Editor/components/blocks/PictureSlot.tsx
@@ -92,6 +92,7 @@ export const PictureSlot = memo(({ idRef, v, res, title, description, props }: P
id: 'picture-slot-modal',
child: (