From 4bc76208c7f0b419b0a6744adbcf34dfded4caa1 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 19 Jan 2021 16:23:27 +0800 Subject: ... --- .../src/app/views/timeline-common/TimelinePageTemplate.tsx | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx') 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 { export default function TimelinePageTemplate( props: TimelinePageTemplateProps ): React.ReactElement | null { - const { t } = useTranslation(); - const { name } = props; const service = timelineService; @@ -87,14 +84,6 @@ export default function TimelinePageTemplate( return "notexist"; } else { const operations: TimelinePageTemplateUIOperations = { - 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()) -- cgit v1.2.3