From 51248f5b4f3baa85ed566f1f3183ffd18a74e8a2 Mon Sep 17 00:00:00 2001 From: seaerchin Date: Tue, 30 Jul 2024 05:15:29 +0800 Subject: [PATCH] fix: prevent redir till save done --- .../components/ComplexEditorStateDrawer.tsx | 15 ++++++----- .../components/MetadataEditorStateDrawer.tsx | 20 +++++++++----- .../components/TipTapComponent.tsx | 26 +++++++++++-------- 3 files changed, 37 insertions(+), 24 deletions(-) diff --git a/apps/studio/src/features/editing-experience/components/ComplexEditorStateDrawer.tsx b/apps/studio/src/features/editing-experience/components/ComplexEditorStateDrawer.tsx index b543749ebb..54e1240707 100644 --- a/apps/studio/src/features/editing-experience/components/ComplexEditorStateDrawer.tsx +++ b/apps/studio/src/features/editing-experience/components/ComplexEditorStateDrawer.tsx @@ -133,6 +133,7 @@ export default function ComplexEditorStateDrawer(): JSX.Element { colorScheme="sub" size="sm" p="0.625rem" + isDisabled={isLoading} onClick={() => { setPreviewPageState(savedPageState) setDrawerState({ state: "root" }) @@ -172,13 +173,15 @@ export default function ComplexEditorStateDrawer(): JSX.Element {