]> Untitled Git - lemmy-ui.git/commitdiff
Make preview button say "edit" when in preview mode (#1164)
authorSleeplessOne1917 <abias1122@gmail.com>
Mon, 12 Jun 2023 18:14:03 +0000 (18:14 +0000)
committerGitHub <noreply@github.com>
Mon, 12 Jun 2023 18:14:03 +0000 (14:14 -0400)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
src/shared/components/common/markdown-textarea.tsx

index b92170d839179ff9561ba46b9ded725ba67be5fc..38a2c2ed5ae7c30c5ac1332598430880d0e39a1b 100644 (file)
@@ -211,7 +211,7 @@ export class MarkdownTextArea extends Component<
                 }`}
                 onClick={linkEvent(this, this.handlePreviewToggle)}
               >
-                {i18n.t("preview")}
+                {this.state.previewMode ? i18n.t("edit") : i18n.t("preview")}
               </button>
             )}
             {/* A flex expander */}