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 | d83b2752de6fe465f9589efbcf7fd46e16bdb2cc (patch) | |
tree | e81138e85c33ffc9195e0e75c9ab31ebf44efc44 /FrontEnd/src/app/views/timeline-common/Timeline.tsx | |
parent | 1d3f97912b40f84a3ef826b3b8b39b74cb35c2f9 (diff) | |
download | timeline-d83b2752de6fe465f9589efbcf7fd46e16bdb2cc.tar.gz timeline-d83b2752de6fe465f9589efbcf7fd46e16bdb2cc.tar.bz2 timeline-d83b2752de6fe465f9589efbcf7fd46e16bdb2cc.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) |