From a373c1fe2cf599b09c8f5b2d9fd3bfc5efad9047 Mon Sep 17 00:00:00 2001 From: Marcia Date: Fri, 13 Dec 2024 17:40:01 -0600 Subject: [PATCH] Fixed bad merge conflict from rebase. --- frontend/src/components/pages/RequestKit.jsx | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/frontend/src/components/pages/RequestKit.jsx b/frontend/src/components/pages/RequestKit.jsx index 7529ee3f..48fa14ae 100644 --- a/frontend/src/components/pages/RequestKit.jsx +++ b/frontend/src/components/pages/RequestKit.jsx @@ -40,24 +40,6 @@ function RequestKit({ user }) { window.scrollTo(0, 0); }, []); - useEffect(() => { - const fetchKitName = async () => { - if (kitId) { - try { - const response = await fetch(`${API_URL}/kits/${kitId}`); - const data = await response.json(); - setKitName(data.name); - } catch (error) { - console.error('Error fetching kit name:', error); - } - } else { - setKitName(''); - } - }; - - fetchKitName(); - }, [kitId]); - const handleSubmit = async (e) => { e.preventDefault(); @@ -83,7 +65,7 @@ function RequestKit({ user }) { try { // Send POST request to registration endpoint - await validationSchema.validate(formData, { abortEarly: false }); + await validationSchema.validate(orderForm, { abortEarly: false }); const response = await fetch(ordersUrl, { method: "POST", headers: {