diff --git a/src/containers/AddPostForm.jsx b/src/containers/AddPostForm.jsx index 5157cf34ad4aca98dc0d94e64cc1a3827a4e5e84..a9e85455318ce3e998b781f0c386b885ecd2f300 100644 --- a/src/containers/AddPostForm.jsx +++ b/src/containers/AddPostForm.jsx @@ -52,13 +52,29 @@ const AddPostForm = ({ className }) => { </ErrorMessage> )} + <MarkdownEditor + value={text} + onChange={onTextInput} + error={ + noTextError + ? "Před přidáním příspěvku nezapomeňte vyplnit jeho obsah." + : null + } + placeholder="Vyplňte text vašeho příspěvku" + toolbarCommands={[ + ["header", "bold", "italic", "strikethrough"], + ["link", "quote", "image"], + ["unordered-list", "ordered-list"], + ]} + /> + <div className="form-field" onChange={(evt) => setType(evt.target.value)}> <div className="form-field__wrapper"> <div className="radio form-field__control"> <label> <input type="radio" name="postType" value="post" defaultChecked /> <span> - Přidat <strong>běžný příspěvek</strong> + Přidávám <strong>běžný příspěvek</strong> </span> </label> </div> @@ -67,29 +83,13 @@ const AddPostForm = ({ className }) => { <label> <input type="radio" name="postType" value="procedure-proposal" /> <span> - Přidat <strong>návrh postupu</strong> + Přidávám <strong>návrh postupu</strong> </span> </label> </div> </div> </div> - <MarkdownEditor - value={text} - onChange={onTextInput} - error={ - noTextError - ? "Před přidáním příspěvku nezapomeňte vyplnit jeho obsah." - : null - } - placeholder="Vyplňte text vašeho příspěvku" - toolbarCommands={[ - ["header", "bold", "italic", "strikethrough"], - ["link", "quote", "image"], - ["unordered-list", "ordered-list"], - ]} - /> - <div className="space-x-4"> <Button onClick={onAdd}