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/TimelineCard.tsx | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

(limited to 'FrontEnd/src/views/timeline/TimelineCard.tsx')

diff --git a/FrontEnd/src/views/timeline/TimelineCard.tsx b/FrontEnd/src/views/timeline/TimelineCard.tsx
index 56057560..339fbfa0 100644
--- a/FrontEnd/src/views/timeline/TimelineCard.tsx
+++ b/FrontEnd/src/views/timeline/TimelineCard.tsx
@@ -58,17 +58,11 @@ const TimelineCard: React.FC<TimelinePageCardProps> = (props) => {
         setDialog={setDialog}
         {...props}
       />
-      {(() => {
-        if (dialog === "delete") {
-          return (
-            <TimelineDeleteDialog
-              timeline={timeline}
-              open
-              close={() => setDialog(null)}
-            />
-          );
-        }
-      })()}
+      <TimelineDeleteDialog
+        timeline={timeline}
+        open={dialog === "delete"}
+        close={() => setDialog(null)}
+      />
     </>
   );
 };
-- 
cgit v1.2.3

