From d8f6a32bb251e56ea95debf95ce4a5e5bbeada6b Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Sun, 8 Jun 2025 19:19:30 -0700 Subject: [PATCH] Show modal during upload --- .../features/page/components/page-import-modal.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/client/src/features/page/components/page-import-modal.tsx b/apps/client/src/features/page/components/page-import-modal.tsx index 9eff714a..dc81b02c 100644 --- a/apps/client/src/features/page/components/page-import-modal.tsx +++ b/apps/client/src/features/page/components/page-import-modal.tsx @@ -92,6 +92,14 @@ function ImportFormatSelection({ spaceId, onClose }: ImportFormatSelection) { } try { + notifications.show({ + id: "import", + message: t("Uploading import file"), + loading: true, + withCloseButton: false, + autoClose: false, + }); + const importTask = await importZip(selectedFile, spaceId, source); notifications.show({ id: "import", @@ -105,12 +113,12 @@ function ImportFormatSelection({ spaceId, onClose }: ImportFormatSelection) { setFileTaskId(importTask.id); onClose(); } catch (err) { - console.log("Failed to import page", err); + console.log("Failed to upload import file", err); notifications.update({ id: "import", color: "red", - title: t("Failed to import pages"), - message: t("Unable to import pages. Please try again."), + title: t("Failed to upload import file"), + message: err?.response.data.message, icon: , loading: false, withCloseButton: true,