From cd521b4fca89bebe036b70695f3b45b0cfcc035d Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Wed, 7 Jul 2021 01:19:47 +0800
Subject: feat: Add dialog animations.

---
 FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

(limited to 'FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx')

diff --git a/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx b/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx
index 300b3d9d..42ba37de 100644
--- a/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx
+++ b/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx
@@ -190,15 +190,13 @@ const MarkdownPostEdit: React.FC<MarkdownPostEditProps> = ({
           },
         ]}
       />
-      {showLeaveConfirmDialog && (
-        <ConfirmDialog
-          onClose={() => setShowLeaveConfirmDialog(false)}
-          onConfirm={onClose}
-          open
-          title="timeline.dropDraft"
-          body="timeline.confirmLeave"
-        />
-      )}
+      <ConfirmDialog
+        onClose={() => setShowLeaveConfirmDialog(false)}
+        onConfirm={onClose}
+        open={showLeaveConfirmDialog}
+        title="timeline.dropDraft"
+        body="timeline.confirmLeave"
+      />
     </>
   );
 };
-- 
cgit v1.2.3

