aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-01-11 21:43:11 +0800
committercrupest <crupest@outlook.com>2021-01-11 21:43:11 +0800
commit9b95bd40ab1637cdea343b078e9e391ba4f5415d (patch)
tree55e736c000e5e841d99325574a118640afa57a3c /FrontEnd/src/app/views
parente4c96126ef3cb70fce3dec7244f0eb368f64db37 (diff)
downloadtimeline-9b95bd40ab1637cdea343b078e9e391ba4f5415d.tar.gz
timeline-9b95bd40ab1637cdea343b078e9e391ba4f5415d.tar.bz2
timeline-9b95bd40ab1637cdea343b078e9e391ba4f5415d.zip
...
Diffstat (limited to 'FrontEnd/src/app/views')
-rw-r--r--FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx18
1 files changed, 1 insertions, 17 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx b/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
index b4058fbe..d7e4d696 100644
--- a/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
+++ b/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
@@ -40,7 +40,7 @@ export default function TimelinePageTemplate<TManageItem>(
null
);
- const [timelineAndStatus, setTimelineAndStatus] = useTimeline(name);
+ const timelineAndStatus = useTimeline(name);
const postsAndState = usePosts(name);
const onPost: TimelinePostSendCallback = React.useCallback(
@@ -111,13 +111,6 @@ export default function TimelinePageTemplate<TManageItem>(
user != null
? () => {
const { isBookmark } = timeline;
- setTimelineAndStatus({
- ...timelineAndStatus,
- data: {
- ...timeline,
- isBookmark: !isBookmark,
- },
- });
const client = getHttpBookmarkClient();
const promise = isBookmark
? client.delete(name)
@@ -136,7 +129,6 @@ export default function TimelinePageTemplate<TManageItem>(
},
type: "danger",
});
- setTimelineAndStatus(timelineAndStatus);
}
);
}
@@ -145,13 +137,6 @@ export default function TimelinePageTemplate<TManageItem>(
user != null && user.hasHighlightTimelineAdministrationPermission
? () => {
const { isHighlight } = timeline;
- setTimelineAndStatus({
- ...timelineAndStatus,
- data: {
- ...timeline,
- isHighlight: !isHighlight,
- },
- });
const client = getHttpHighlightClient();
const promise = isHighlight
? client.delete(name)
@@ -170,7 +155,6 @@ export default function TimelinePageTemplate<TManageItem>(
},
type: "danger",
});
- setTimelineAndStatus(timelineAndStatus);
}
);
}