From bd20aecb06ef38c1607db64fc4c235e2ca777aa3 Mon Sep 17 00:00:00 2001 From: Asara Date: Sat, 19 Oct 2019 18:44:22 -0400 Subject: [PATCH] Fix hookup of newpost thanks markpassando --- src/components/NewPost.js | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/src/components/NewPost.js b/src/components/NewPost.js index a8f64ec..15c61f1 100644 --- a/src/components/NewPost.js +++ b/src/components/NewPost.js @@ -2,35 +2,23 @@ import React from 'react'; import ReactMde from "react-mde"; import ReactMarkdown from 'react-markdown'; import 'github-markdown-css' +import "react-mde/lib/styles/css/react-mde-all.css" -class NewPost extends React.Component { - constructor (props) { - super(props) - this.state = { - title: '', - content: '' - } - } - handleChange = value => { - this.setState({ mdeValue: value }); - }; - - - render () { +const NewPost = (props) => { + const [value, setValue] = React.useState("**Hello world!!!**"); + const [selectedTab, setSelectedTab] = React.useState("write"); return(
} + generateMarkdownPreview={(markdown) => + Promise.resolve()} />
) - } } export default NewPost;