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 | 6965a02266b835a758c127f250c9628cebfbbc6d (patch) | |
| tree | 9eadd63dea77089e7b9eb6efd9135013430f9ba1 /FrontEnd/src/app/views/timeline-common/TimelineCardTemplate.tsx | |
| parent | 962eb6ef3096dc90149a286190096a99496dd90a (diff) | |
| download | timeline-6965a02266b835a758c127f250c9628cebfbbc6d.tar.gz timeline-6965a02266b835a758c127f250c9628cebfbbc6d.tar.bz2 timeline-6965a02266b835a758c127f250c9628cebfbbc6d.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", }); }); |
