From 3a1f46118e81c5a6206a3c0375f275ee7f369200 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Tue, 12 Jan 2021 22:10:47 +0800
Subject: ...

---
 FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

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

diff --git a/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx b/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
index 5c87756c..5833c541 100644
--- a/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
+++ b/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
@@ -132,13 +132,9 @@ export default function TimelinePageTemplate<TManageItem>(
     }
   })();
 
-  const closeDialog = React.useCallback((): void => {
-    setDialog(null);
-  }, []);
-
-  let dialogElement: React.ReactElement | undefined;
-
   const timeline = timelineAndStatus?.data;
+  let dialogElement: React.ReactElement | undefined;
+  const closeDialog = (): void => setDialog(null);
 
   if (dialog === "property") {
     if (timeline == null || timeline === "notexist") {
-- 
cgit v1.2.3

