From c628b5950db53938a7f1e2207226e5fa6c6d2830 Mon Sep 17 00:00:00 2001 From: G4EVA-dev Date: Tue, 30 Jul 2024 15:19:45 +0100 Subject: [PATCH] api fixing not responding --- src/components/waitList/WaitListForm.tsx | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/waitList/WaitListForm.tsx b/src/components/waitList/WaitListForm.tsx index 2c3779c30..30a64fc7d 100644 --- a/src/components/waitList/WaitListForm.tsx +++ b/src/components/waitList/WaitListForm.tsx @@ -79,16 +79,19 @@ const WaitlistForm: React.FC = () => { } else { setErrors({}); try { - const response = await fetch(process.env.API_URL as string, { - method: "POST", - headers: { - "Content-Type": "application/json", + const response = await fetch( + process.env.NEXT_PUBLIC_API_URL as string, + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + full_name: formData.full_name, + email: formData.email, + }), }, - body: JSON.stringify({ - full_name: formData.full_name, - email: formData.email, - }), - }); + ); if (!response.ok) { const errorData = await response.json();