Skip to content

Commit

Permalink
change to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jdonszelmann committed May 21, 2024
1 parent c6e2567 commit 66fbc79
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ import Sponsor from "../components/sponsor.astro";
import SponsorTier from "../components/sponsor-tier.astro";
---

<script lang="javascript">
<script>
document.querySelectorAll("[signup-form]").forEach((form) => {
form.addEventListener("submit", async (e) => {
e.preventDefault();
console.log(e);
const email_input: HTMLElement | null =
document.getElementById("email-signup");
if (email_input === null) {
return;
}

await fetch(
`https://docs.google.com/forms/d/e/1FAIpQLSehxA98qwT-AILVWUoxOMTrYXfuphVas5o5WTazUGc3M1lH0Q/formResponse?&submit=Submit?usp=pp_url&entry.844319193=${document.getElementById("email-signup").value}`,
`https://docs.google.com/forms/d/e/1FAIpQLSehxA98qwT-AILVWUoxOMTrYXfuphVas5o5WTazUGc3M1lH0Q/formResponse?&submit=Submit?usp=pp_url&entry.844319193=${(email_input as HTMLInputElement).value}`,
);
return false;
});
Expand Down

0 comments on commit 66fbc79

Please sign in to comment.