From 6522bbe2b1e0612508c48a7a06cbea89bd4674ae Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Sun, 14 Feb 2021 17:09:01 +0800
Subject: refactor: Refactor all pushAlert call.

---
 .../app/views/timeline-common/TimelineCardTemplate.tsx | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

(limited to 'FrontEnd/src/app/views/timeline-common/TimelineCardTemplate.tsx')

diff --git a/FrontEnd/src/app/views/timeline-common/TimelineCardTemplate.tsx b/FrontEnd/src/app/views/timeline-common/TimelineCardTemplate.tsx
index d6eaa16c..c29e628d 100644
--- a/FrontEnd/src/app/views/timeline-common/TimelineCardTemplate.tsx
+++ b/FrontEnd/src/app/views/timeline-common/TimelineCardTemplate.tsx
@@ -68,12 +68,9 @@ function TimelineCardTemplate({
                       [timeline.isHighlight ? "delete" : "put"](timeline.name)
                       .catch(() => {
                         pushAlert({
-                          message: {
-                            type: "i18n",
-                            key: timeline.isHighlight
-                              ? "timeline.removeHighlightFail"
-                              : "timeline.addHighlightFail",
-                          },
+                          message: timeline.isHighlight
+                            ? "timeline.removeHighlightFail"
+                            : "timeline.addHighlightFail",
                           type: "danger",
                         });
                       });
@@ -92,12 +89,9 @@ function TimelineCardTemplate({
                   [timeline.isBookmark ? "delete" : "put"](timeline.name)
                   .catch(() => {
                     pushAlert({
-                      message: {
-                        type: "i18n",
-                        key: timeline.isBookmark
-                          ? "timeline.removeBookmarkFail"
-                          : "timeline.addBookmarkFail",
-                      },
+                      message: timeline.isBookmark
+                        ? "timeline.removeBookmarkFail"
+                        : "timeline.addBookmarkFail",
                       type: "danger",
                     });
                   });
-- 
cgit v1.2.3

