Skip to content

Commit

Permalink
fix: correct the form JS code attachment id (#100)
Browse files Browse the repository at this point in the history
## Overview

I'd previously added an `<h2>` with id `newsletter`.
  • Loading branch information
JoshuaKGoldberg authored Aug 19, 2024
1 parent 5a75a8c commit 302488f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Newsletter.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const { class: className, ...rest } = Astro.props;
{...rest}
class:list={["newsletter", className]}
action="https://app.loops.so/api/newsletter-form/clwpkthom0067d11n8jbrxb3b"
id="newsletter"
id="newsletter-form"
method="POST"
>
<label for="email">
Expand All @@ -36,7 +36,7 @@ const { class: className, ...rest } = Astro.props;
</div>

<script>
const form = document.getElementById("newsletter") as HTMLFormElement;
const form = document.getElementById("newsletter-form") as HTMLFormElement;

function setMessage(text: string, status: "happy" | "unhappy") {
const messageDiv = document.getElementById(
Expand Down

0 comments on commit 302488f

Please sign in to comment.