From b84ca669c66d7ae9800b1c10bcf8871a2c412b6c Mon Sep 17 00:00:00 2001 From: srinivaspendem Date: Fri, 11 Aug 2023 12:34:15 +0530 Subject: [PATCH] handeling the export fail --- apps/app/components/exporter/export-modal.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/app/components/exporter/export-modal.tsx b/apps/app/components/exporter/export-modal.tsx index 3cea62e49..6a71ee1f3 100644 --- a/apps/app/components/exporter/export-modal.tsx +++ b/apps/app/components/exporter/export-modal.tsx @@ -64,6 +64,7 @@ export const Exporter: React.FC = ({ .then(() => { mutateServices(); router.push(`/${workspaceSlug}/settings/export`); + setExportLoading(false); setToastAlert({ type: "success", title: "Export Successful", @@ -78,13 +79,14 @@ export const Exporter: React.FC = ({ } from the previous export.`, }); }) - .catch(() => + .catch(() => { + setExportLoading(false); setToastAlert({ type: "error", title: "Error!", message: "Export was unsuccessful. Please try again.", - }) - ); + }); + }); } };