aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/timeline-common/Timeline.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-20 15:19:58 +0800
committercrupest <crupest@outlook.com>2021-02-20 15:25:52 +0800
commitd0a318625a30f32e5c0aef24c1882a52de164eb3 (patch)
tree123df54518f6082666af413cd5158e51e8b352fc /FrontEnd/src/app/views/timeline-common/Timeline.tsx
parentb1eb0130ed560cb725a313e9743682b2e5f799f7 (diff)
downloadtimeline-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.tsx6
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)