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

Submit Message

{state.errorMessage &&

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

Sent successfully!

(Optional)

Save this message ID: {state.messageId}

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

Email me or tag/message me on these platforms.

}
); const getGuestbookApiUrl = () => `${import.meta.env.PUBLIC_API_URL}/guestbook`; export default withFormHandling(GuestbookForm, getGuestbookApiUrl, { name: '', website: '', message: '', messageId: '' });