diff options
author | crupest <crupest@outlook.com> | 2021-02-14 17:09:01 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-14 17:09:01 +0800 |
commit | 6522bbe2b1e0612508c48a7a06cbea89bd4674ae (patch) | |
tree | 4c3da3103fb6684d53fd3d9089fbb8c2bacad40c /FrontEnd/src/app/views/timeline-common/TimelineCardTemplate.tsx | |
parent | 647664af3408103681d4522b443f9baa4e6612af (diff) | |
download | timeline-6522bbe2b1e0612508c48a7a06cbea89bd4674ae.tar.gz timeline-6522bbe2b1e0612508c48a7a06cbea89bd4674ae.tar.bz2 timeline-6522bbe2b1e0612508c48a7a06cbea89bd4674ae.zip |
refactor: Refactor all pushAlert call.
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelineCardTemplate.tsx')
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/TimelineCardTemplate.tsx | 18 |
1 files changed, 6 insertions, 12 deletions
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", }); }); |