diff --git a/apps/comments-ui/src/components/Form.js b/apps/comments-ui/src/components/Form.js index 5542ff28bb..858b63f4c0 100644 --- a/apps/comments-ui/src/components/Form.js +++ b/apps/comments-ui/src/components/Form.js @@ -1,7 +1,67 @@ +// import React, {useState} from 'react'; import React from 'react'; import AppContext from '../AppContext'; import Avatar from './Avatar'; +// const Form = (props) => { +// const [message, setMessage] = useState(''); + +// const getHTML = () => { +// // Convert newlines to
for now (until we add a real editor) +// return message.replace('\n', '
'); +// }; + +// const submitForm = async (event) => { +// event.preventDefault(); + +// if (message.length === 0) { +// alert('Please enter a message'); +// return; +// } + +// try { +// // Todo: send comment to server +// await this.context.onAction('addComment', { +// post_id: this.context.postId, +// status: 'published', +// html: getHTML() +// }); + +// // Clear message on success +// setMessage(''); +// } catch (e) { +// // eslint-disable-next-line no-console +// console.error(e); +// } +// }; + +// const handleChange = (event) => { +// setMessage(event.target.value); +// }; + +// return ( +//
+//
+//
+// +//
+//

{this.context.member.name}

+//
 
+//
+//
+//
+//
+//