From 5109401c4ad6dc6f26f1d95bd8a80908b20e92f2 Mon Sep 17 00:00:00 2001 From: Xavier Rutayisire Date: Mon, 16 Oct 2023 16:46:46 +0200 Subject: [PATCH] fix(page type): Fix problem when closing modals after creating a page type --- .../lib/builders/CustomTypeBuilder/SliceZone/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/slice-machine/lib/builders/CustomTypeBuilder/SliceZone/index.tsx b/packages/slice-machine/lib/builders/CustomTypeBuilder/SliceZone/index.tsx index a98200827a..8a15ba977f 100644 --- a/packages/slice-machine/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +++ b/packages/slice-machine/lib/builders/CustomTypeBuilder/SliceZone/index.tsx @@ -188,17 +188,14 @@ const SliceZone: React.FC = ({ const closeUpdateSliceZoneModal = () => { setIsUpdateSliceZoneModalOpen(false); - redirectToEditMode(); }; const closeCreateSliceModal = () => { setIsCreateSliceModalOpen(false); - redirectToEditMode(); }; const closeSlicesTemplatesModal = () => { setIsSlicesTemplatesModalOpen(false); - redirectToEditMode(); }; const onAddSlicesToSliceZone = (newCustomType: CustomTypeSM) => { @@ -311,6 +308,7 @@ const SliceZone: React.FC = ({ }); onAddSlicesToSliceZone(newCustomType); closeUpdateSliceZoneModal(); + redirectToEditMode(); toast.success("Slice(s) added to slice zone"); }} close={closeUpdateSliceZoneModal} @@ -328,6 +326,7 @@ const SliceZone: React.FC = ({ }); onAddSlicesToSliceZone(newCustomType); closeSlicesTemplatesModal(); + redirectToEditMode(); toast.success( = ({ }); onAddSlicesToSliceZone(newCustomType); closeCreateSliceModal(); + redirectToEditMode(); toast.success(