From 57a4aa9bc47d3d38f66819f01f41ab10e9673667 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Tue, 15 Jun 2021 16:46:12 +0800
Subject: ...

---
 FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

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

diff --git a/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx b/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx
index 685e17be..005da933 100644
--- a/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx
+++ b/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx
@@ -6,7 +6,7 @@ import { Prompt } from "react-router";
 
 import { getHttpTimelineClient, HttpTimelinePostInfo } from "@/http/timeline";
 
-import FlatButton from "../common/FlatButton";
+import FlatButton from "../common/button/FlatButton";
 import TabPages from "../common/TabPages";
 import TimelinePostBuilder from "@/services/TimelinePostBuilder";
 import ConfirmDialog from "../common/ConfirmDialog";
@@ -106,8 +106,9 @@ const MarkdownPostEdit: React.FC<MarkdownPostEditProps> = ({
           ) : (
             <>
               <FlatButton
+                text="operationDialog.cancel"
                 className="me-2"
-                variant="danger"
+                color="danger"
                 onClick={() => {
                   if (canLeave) {
                     onClose();
@@ -115,12 +116,8 @@ const MarkdownPostEdit: React.FC<MarkdownPostEditProps> = ({
                     setShowLeaveConfirmDialog(true);
                   }
                 }}
-              >
-                {t("operationDialog.cancel")}
-              </FlatButton>
-              <FlatButton onClick={send} disabled={!canSend}>
-                {t("timeline.send")}
-              </FlatButton>
+              />
+              {canSend && <FlatButton text="timeline.send" onClick={send} />}
             </>
           )
         }
-- 
cgit v1.2.3

