diff options
author | crupest <crupest@outlook.com> | 2021-04-04 23:50:25 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-04-04 23:50:25 +0800 |
commit | da9041846e4903a330dd8e4f8ec92570775ff313 (patch) | |
tree | e382d59f64371e57f25e72646391248274baade8 /FrontEnd/src/app/views/timeline-common/Timeline.tsx | |
parent | 26c14ac0f2780c4489c5fb099e68c51e92a9b4b5 (diff) | |
download | timeline-da9041846e4903a330dd8e4f8ec92570775ff313.tar.gz timeline-da9041846e4903a330dd8e4f8ec92570775ff313.tar.bz2 timeline-da9041846e4903a330dd8e4f8ec92570775ff313.zip |
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/Timeline.tsx')
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/Timeline.tsx | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/Timeline.tsx b/FrontEnd/src/app/views/timeline-common/Timeline.tsx index f7f7dcfc..60fbc45c 100644 --- a/FrontEnd/src/app/views/timeline-common/Timeline.tsx +++ b/FrontEnd/src/app/views/timeline-common/Timeline.tsx @@ -13,7 +13,6 @@ import TimelineTop from "./TimelineTop"; export interface TimelineProps { className?: string; style?: React.CSSProperties; - top?: string | number; timelineName: string; reloadKey: number; onReload: () => void; @@ -21,15 +20,7 @@ export interface TimelineProps { } const Timeline: React.FC<TimelineProps> = (props) => { - const { - timelineName, - className, - style, - top, - reloadKey, - onReload, - onLoad, - } = props; + const { timelineName, className, style, reloadKey, onReload, onLoad } = props; const [state, setState] = React.useState< "loading" | "loaded" | "offline" | "notexist" | "forbid" | "error" @@ -81,14 +72,16 @@ const Timeline: React.FC<TimelineProps> = (props) => { switch (state) { case "loading": return ( - <TimelineTop - className="timeline-top-loading-enter" - height={100} - lineProps={{ - center: "loading", - startSegmentLength: 56, - }} - /> + <> + <TimelineTop + className="timeline-top-loading-enter" + height={100} + lineProps={{ + center: "loading", + startSegmentLength: 56, + }} + /> + </> ); case "offline": return ( @@ -116,11 +109,10 @@ const Timeline: React.FC<TimelineProps> = (props) => { ); default: return ( - <TimelinePagedPostListView - posts={posts} - top={top} - onReload={onReload} - /> + <> + <TimelineTop height={40} /> + <TimelinePagedPostListView posts={posts} onReload={onReload} /> + </> ); } }; |