From b21f48d0a0b3c6d32b8eb9a3b5c84f8ff3dbc136 Mon Sep 17 00:00:00 2001
From: Andrew Lee <alee14498@protonmail.com>
Date: Wed, 7 Feb 2024 18:06:04 -0500
Subject: Using supabase as the main db

---
 src/components/GuestbookForm.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/components/GuestbookForm.jsx')

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: '',
-- 
cgit v1.2.3

