aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-01-12 22:10:47 +0800
committercrupest <crupest@outlook.com>2021-01-12 22:10:47 +0800
commit3a1f46118e81c5a6206a3c0375f275ee7f369200 (patch)
tree107607d9defbaf4718e9a6be6351ecfe47d8fe29
parent36515dde9ddaec074b68492a6e220bc4ed3d70af (diff)
downloadtimeline-3a1f46118e81c5a6206a3c0375f275ee7f369200.tar.gz
timeline-3a1f46118e81c5a6206a3c0375f275ee7f369200.tar.bz2
timeline-3a1f46118e81c5a6206a3c0375f275ee7f369200.zip
...
-rw-r--r--FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx8
1 files changed, 2 insertions, 6 deletions
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") {