Skip to content

Commit

Permalink
wait longer for listmonk to wake up in newsletter signup action
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo committed Sep 15, 2024
1 parent 05d3108 commit 188d3e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion app/components/NewsletterSignup/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
flex-direction: column;
justify-content: center;
align-items: center;
margin: 0;
background-color: lightseagreen;
}
.container > form.loading {
Expand Down Expand Up @@ -130,3 +129,7 @@
background-color: grey;
cursor: not-allowed;
}

.success {
margin-top: 0.6em;
}
2 changes: 1 addition & 1 deletion app/components/NewsletterSignup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const NewsletterSignup = () => {
aria-label="sign up for our newsletter"
disabled={captchaState !== "verified"}
>
sign me up
{fetcher.state === "idle" ? "sign me up" : "signing you up..."}
</button>
</div>
</fetcher.Form>
Expand Down
2 changes: 1 addition & 1 deletion app/routes/newsletter-signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const action: ActionFunction = async ({ request }) => {
await fetch(`${process.env.LISTMONK_API}`, {
method: "head",
});
await new Promise((resolve) => setTimeout(resolve, 500));
await new Promise((resolve) => setTimeout(resolve, 1000));

let res = await fetch(`${process.env.LISTMONK_API}/public/subscription`, {
method: "post",
Expand Down

0 comments on commit 188d3e8

Please sign in to comment.