aboutsummaryrefslogtreecommitdiff
path: root/src/components/GuestbookForm.jsx
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2024-02-07 18:06:04 -0500
committerAndrew Lee <alee14498@protonmail.com>2024-02-07 18:06:04 -0500
commitb21f48d0a0b3c6d32b8eb9a3b5c84f8ff3dbc136 (patch)
treec6d9b3da6a5398d6ba4456586785750969a5406e /src/components/GuestbookForm.jsx
parentccd810f3e080ea2717772850647efb06df074c32 (diff)
downloadpersonal-website-b21f48d0a0b3c6d32b8eb9a3b5c84f8ff3dbc136.tar.gz
personal-website-b21f48d0a0b3c6d32b8eb9a3b5c84f8ff3dbc136.tar.bz2
personal-website-b21f48d0a0b3c6d32b8eb9a3b5c84f8ff3dbc136.zip
Using supabase as the main db
Diffstat (limited to 'src/components/GuestbookForm.jsx')
-rw-r--r--src/components/GuestbookForm.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/GuestbookForm.jsx b/src/components/GuestbookForm.jsx
index 8573b5c..d0fcbce 100644
--- a/src/components/GuestbookForm.jsx
+++ b/src/components/GuestbookForm.jsx
@@ -38,7 +38,8 @@ class GuestbookForm extends Component {
try {
const messageHtml = marked(DOMPurify.sanitize(this.state.message));
- await createMessage({ ...this.state, message: messageHtml });
+ const { isMessageSent, errorMessage, ...messageData } = this.state; // Exclude isMessageSent from the data
+ await createMessage({ ...messageData, message: messageHtml });
this.setState({
name: '',