From ddab1611b81ee6b60e632ff1b579a5bbb5c820ef Mon Sep 17 00:00:00 2001 From: Chigozirim Igweamaka Date: Fri, 24 May 2024 10:54:28 +0100 Subject: [PATCH] Prevent default form behavior. --- client/src/components/Form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/Form.js b/client/src/components/Form.js index 14bcc63..7ffc6dc 100644 --- a/client/src/components/Form.js +++ b/client/src/components/Form.js @@ -10,7 +10,8 @@ const Form = ({ socket }) => { setFormState({ ...formState, [name]: value }); }; - const submitForm = () => { + const submitForm = (event) => { + event.preventDefault(); const { spotifyUrl } = formState; if (spotifyURLisValid(spotifyUrl) === false) { return;