Skip to content

Commit d777860

Browse files
Update script.js
Signed-off-by: Ankit Raj <ankit5242raj@gmail.com>
1 parent 450fe91 commit d777860

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

script.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -179,23 +179,3 @@ document.addEventListener('DOMContentLoaded', animateAboutLines);
179179
window.addEventListener('scroll', animateAboutLines);
180180

181181

182-
//api section for get in touch
183-
document.getElementById("contactForm").addEventListener("submit", async function (e) {
184-
e.preventDefault();
185-
const form = e.target;
186-
const data = {
187-
name: form.name.value,
188-
email: form.email.value,
189-
message: form.message.value,
190-
};
191-
192-
const res = await fetch("/api/contact", {
193-
method: "POST",
194-
headers: { "Content-Type": "application/json" },
195-
body: JSON.stringify(data)
196-
});
197-
198-
const result = await res.json();
199-
alert(result.message || "Sent!");
200-
form.reset();
201-
});

0 commit comments

Comments
 (0)