From 2cff952ed1b99df2a277cedfa2dccbb8cc304342 Mon Sep 17 00:00:00 2001 From: G4EVA-dev Date: Tue, 30 Jul 2024 06:39:22 +0100 Subject: [PATCH] feat:team-anchor update conflicts --- .env | 1 - .env.sample | 2 +- src/components/waitList/WaitListForm.tsx | 21 +++++++++------------ 3 files changed, 10 insertions(+), 14 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 0b179b50e..000000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -NEXT_PUBLIC_API_URL=https://deployment.api-python.boilerplate.hng.tech/api/v1/waitlists/ diff --git a/.env.sample b/.env.sample index c3881ef0a..3e397f6b6 100644 --- a/.env.sample +++ b/.env.sample @@ -1,4 +1,4 @@ -API_URL=https://your-teams-backend-probe-url.com +API_URL=https://deployment.api-python.boilerplate.hng.tech/api/v1/waitlists/ GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= AUTH_SECRET= \ No newline at end of file diff --git a/src/components/waitList/WaitListForm.tsx b/src/components/waitList/WaitListForm.tsx index 30a64fc7d..2c3779c30 100644 --- a/src/components/waitList/WaitListForm.tsx +++ b/src/components/waitList/WaitListForm.tsx @@ -79,19 +79,16 @@ const WaitlistForm: React.FC = () => { } else { setErrors({}); try { - 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, - }), + const response = await fetch(process.env.API_URL as string, { + method: "POST", + headers: { + "Content-Type": "application/json", }, - ); + body: JSON.stringify({ + full_name: formData.full_name, + email: formData.email, + }), + }); if (!response.ok) { const errorData = await response.json();