diff options
author | crupest <crupest@outlook.com> | 2021-01-19 16:23:27 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-01-19 16:23:27 +0800 |
commit | c3cf26a7788d97135e0f2a3e247e6cbe6b1b9664 (patch) | |
tree | c5e399a7651e99746ea60bb8ec27d88d2e06c059 /FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx | |
parent | a5deeea162433c52a3b07c20b34831522ee01acb (diff) | |
download | timeline-c3cf26a7788d97135e0f2a3e247e6cbe6b1b9664.tar.gz timeline-c3cf26a7788d97135e0f2a3e247e6cbe6b1b9664.tar.bz2 timeline-c3cf26a7788d97135e0f2a3e247e6cbe6b1b9664.zip |
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx')
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx | 11 |
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()) |