aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-01-19 16:23:27 +0800
committercrupest <crupest@outlook.com>2021-01-19 16:23:27 +0800
commit4bc76208c7f0b419b0a6744adbcf34dfded4caa1 (patch)
tree43cf51a40846cddba08253b8a8c6d76490cdf141 /FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
parent3d2698df763910405b11a8bddcac4c9ae5841583 (diff)
downloadtimeline-4bc76208c7f0b419b0a6744adbcf34dfded4caa1.tar.gz
timeline-4bc76208c7f0b419b0a6744adbcf34dfded4caa1.tar.bz2
timeline-4bc76208c7f0b419b0a6744adbcf34dfded4caa1.zip
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx')
-rw-r--r--FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx11
1 files changed, 0 insertions, 11 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx b/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
index da020be4..bff4547e 100644
--- a/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
+++ b/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx
@@ -1,5 +1,4 @@
import React from "react";
-import { useTranslation } from "react-i18next";
import { UiLogicError } from "@/common";
import { pushAlert } from "@/services/alert";
@@ -31,8 +30,6 @@ export interface TimelinePageTemplateProps<TManageItem> {
export default function TimelinePageTemplate<TManageItem>(
props: TimelinePageTemplateProps<TManageItem>
): React.ReactElement | null {
- const { t } = useTranslation();
-
const { name } = props;
const service = timelineService;
@@ -87,14 +84,6 @@ export default function TimelinePageTemplate<TManageItem>(
return "notexist";
} else {
const operations: TimelinePageTemplateUIOperations<TManageItem> = {
- onDeletePost: (post) => {
- service.deletePost(name, post.id).catch(() => {
- pushAlert({
- type: "danger",
- message: t("timeline.deletePostFailed"),
- });
- });
- },
onPost: service.hasPostPermission(user, timeline)
? (req) =>
service.createPost(name, req).then(() => scrollToBottomNextSync())