diff options
author | crupest <crupest@outlook.com> | 2021-04-04 23:12:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-04-04 23:12:35 +0800 |
commit | 26c14ac0f2780c4489c5fb099e68c51e92a9b4b5 (patch) | |
tree | 7fc54f559561e69884bd34032d424d064ea09702 /FrontEnd/src/app/views/timeline-common/Timeline.tsx | |
parent | fcd581f21725d7d45e401f0bc3a77db18319ee97 (diff) | |
download | timeline-26c14ac0f2780c4489c5fb099e68c51e92a9b4b5.tar.gz timeline-26c14ac0f2780c4489c5fb099e68c51e92a9b4b5.tar.bz2 timeline-26c14ac0f2780c4489c5fb099e68c51e92a9b4b5.zip |
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/Timeline.tsx')
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/Timeline.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
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 ( |