diff --git a/frontend/apps/artcraft/app/src/components/reusable/UploadModal3D/UploadModal3D.tsx b/frontend/apps/artcraft/app/src/components/reusable/UploadModal3D/UploadModal3D.tsx index 9f6783cd31..b7b00e9dc6 100644 --- a/frontend/apps/artcraft/app/src/components/reusable/UploadModal3D/UploadModal3D.tsx +++ b/frontend/apps/artcraft/app/src/components/reusable/UploadModal3D/UploadModal3D.tsx @@ -73,17 +73,6 @@ export function UploadModal3D(props: Props) { } }, [isOpen]); - useEffect(() => { - if (uploaderState.status === UploaderStates.success) { - // Automatically open the global Gallery modal after a successful upload - galleryModalVisibleViewMode.value = true; - galleryModalVisibleDuringDrag.value = true; - - onSuccess(selectedCategory); - onClose(); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [uploaderState.status]); const UploaderModalContent = () => { switch (uploaderState.status) { @@ -130,8 +119,12 @@ export function UploadModal3D(props: Props) { { - onClose(); + // Open the gallery so the user can drag the freshly + // uploaded model onto the canvas. + galleryModalVisibleViewMode.value = true; + galleryModalVisibleDuringDrag.value = true; onSuccess(selectedCategory); + onClose(); }} /> ); diff --git a/frontend/apps/artcraft/app/src/components/reusable/UploadModalImage/UploadModalImage.tsx b/frontend/apps/artcraft/app/src/components/reusable/UploadModalImage/UploadModalImage.tsx index df25115a24..c90c9d8a69 100644 --- a/frontend/apps/artcraft/app/src/components/reusable/UploadModalImage/UploadModalImage.tsx +++ b/frontend/apps/artcraft/app/src/components/reusable/UploadModalImage/UploadModalImage.tsx @@ -48,17 +48,6 @@ export function UploadModalImage(props: Props) { } }, [isOpen]); - useEffect(() => { - if (uploaderState.status === UploaderStates.success) { - // Automatically open the global Gallery modal after a successful upload - galleryModalVisibleViewMode.value = true; - galleryModalVisibleDuringDrag.value = true; - - onSuccess(selectedCategory); - onClose(); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [uploaderState.status]); const UploaderModalContent = () => { switch (uploaderState.status) { @@ -94,8 +83,12 @@ export function UploadModalImage(props: Props) { { - onClose(); + // Open the gallery so the user can drag the freshly + // uploaded image onto the canvas. + galleryModalVisibleViewMode.value = true; + galleryModalVisibleDuringDrag.value = true; onSuccess(selectedCategory); + onClose(); }} /> ); diff --git a/frontend/apps/artcraft/app/src/components/reusable/UploadModalSplat/UploadModalSplat.tsx b/frontend/apps/artcraft/app/src/components/reusable/UploadModalSplat/UploadModalSplat.tsx index d036833472..33099a2966 100644 --- a/frontend/apps/artcraft/app/src/components/reusable/UploadModalSplat/UploadModalSplat.tsx +++ b/frontend/apps/artcraft/app/src/components/reusable/UploadModalSplat/UploadModalSplat.tsx @@ -52,18 +52,6 @@ export function UploadModalSplat(props: Props) { } }, [isOpen]); - useEffect(() => { - if (uploaderState.status === UploaderStates.success) { - // Match the image / 3D-model upload flow: open the gallery so the - // user can drag the freshly uploaded splat onto the canvas. - galleryModalVisibleViewMode.value = true; - galleryModalVisibleDuringDrag.value = true; - - onSuccess(selectedCategory); - onClose(); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [uploaderState.status]); const UploaderModalContent = () => { switch (uploaderState.status) { @@ -103,8 +91,12 @@ export function UploadModalSplat(props: Props) { { - onClose(); + // Open the gallery so the user can drag the freshly + // uploaded splat onto the canvas. + galleryModalVisibleViewMode.value = true; + galleryModalVisibleDuringDrag.value = true; onSuccess(selectedCategory); + onClose(); }} /> );