Skip to content

Commit

Permalink
api fixing not responding
Browse files Browse the repository at this point in the history
  • Loading branch information
G4EVA-dev committed Jul 30, 2024
1 parent 3085f2a commit c628b59
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/components/waitList/WaitListForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c628b59

Please sign in to comment.