import { h } from 'preact'; import withFormHandling from './FormHandling'; import '../styles/Form.css'; const BlogCommentsForm = ({ state, handleChange, handleSubmit }) => (

Submit Comment

{state.errorMessage &&

} {state.isMessageSent && !state.errorMessage &&

Sent successfully!

(Optional)

Save this message ID: {state.commentId}

Then send it to me, to verify that you sent this comment.

Email me or tag/message me on these platforms.

}
); const getBlogCommentsApiUrl = (props) => `${import.meta.env.PUBLIC_API_URL}/comments/${props.slug}`; export default withFormHandling(BlogCommentsForm, getBlogCommentsApiUrl, { author: '', comment: '', commentId: '' });