aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/timeline-common/Timeline.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-04-04 23:12:35 +0800
committercrupest <crupest@outlook.com>2021-04-04 23:12:35 +0800
commitfb3ef58c8789f91e8600697521e6a6adb648556a (patch)
tree5630676bf2edf0402355155b7c46c03ccf9df71b /FrontEnd/src/app/views/timeline-common/Timeline.tsx
parentb8f829736e4ebe571ecc72d8c3157fe56668a469 (diff)
downloadtimeline-fb3ef58c8789f91e8600697521e6a6adb648556a.tar.gz
timeline-fb3ef58c8789f91e8600697521e6a6adb648556a.tar.bz2
timeline-fb3ef58c8789f91e8600697521e6a6adb648556a.zip
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/Timeline.tsx')
-rw-r--r--FrontEnd/src/app/views/timeline-common/Timeline.tsx20
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 (