diff options
author | crupest <crupest@outlook.com> | 2021-02-20 15:19:58 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-20 15:25:52 +0800 |
commit | d0a318625a30f32e5c0aef24c1882a52de164eb3 (patch) | |
tree | 123df54518f6082666af413cd5158e51e8b352fc /FrontEnd/src/app/views/timeline-common/Timeline.tsx | |
parent | b1eb0130ed560cb725a313e9743682b2e5f799f7 (diff) | |
download | timeline-d0a318625a30f32e5c0aef24c1882a52de164eb3.tar.gz timeline-d0a318625a30f32e5c0aef24c1882a52de164eb3.tar.bz2 timeline-d0a318625a30f32e5c0aef24c1882a52de164eb3.zip |
fix: Fix reload logic.
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/Timeline.tsx')
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/Timeline.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/Timeline.tsx b/FrontEnd/src/app/views/timeline-common/Timeline.tsx index d40f8e94..3f2cbfb5 100644 --- a/FrontEnd/src/app/views/timeline-common/Timeline.tsx +++ b/FrontEnd/src/app/views/timeline-common/Timeline.tsx @@ -42,9 +42,11 @@ const Timeline: React.FC<TimelineProps> = (props) => { >("loading"); React.useEffect(() => { - let subscribe = true; - setPosts("loading"); + }, [timelineName]); + + React.useEffect(() => { + let subscribe = true; void getHttpTimelineClient() .listPost(timelineName) |