From fb3ef58c8789f91e8600697521e6a6adb648556a Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Sun, 4 Apr 2021 23:12:35 +0800
Subject: ...

---
 FrontEnd/src/app/views/timeline-common/Timeline.tsx | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

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

diff --git a/FrontEnd/src/app/views/timeline-common/Timeline.tsx b/FrontEnd/src/app/views/timeline-common/Timeline.tsx
index f2c38aeb..f7f7dcfc 100644
--- a/FrontEnd/src/app/views/timeline-common/Timeline.tsx
+++ b/FrontEnd/src/app/views/timeline-common/Timeline.tsx
@@ -73,22 +73,22 @@ const Timeline: React.FC<TimelineProps> = (props) => {
   }, [timelineName, reloadKey]);
 
   React.useEffect(() => {
-    if (Array.isArray(posts)) {
+    if (state === "loaded") {
       onLoad?.();
     }
-  }, [posts, onLoad]);
+  }, [state, onLoad]);
 
   switch (state) {
     case "loading":
       return (
-        <div>
-          <TimelineTop
-            lineProps={{
-              center: "loading",
-              startSegmentLength: 56,
-            }}
-          />
-        </div>
+        <TimelineTop
+          className="timeline-top-loading-enter"
+          height={100}
+          lineProps={{
+            center: "loading",
+            startSegmentLength: 56,
+          }}
+        />
       );
     case "offline":
       return (
-- 
cgit v1.2.3

