Hi there - new to Astro - love it so far but noticed something weird. I've got a button in a form with a method of POST. I click on the button then I refresh and it sends the request again so I've got double requests. Haven't tested in production. Anyone know how to solve this behaviour?
---
import Stripe from 'stripe';
const stripe = new Stripe('sk_test_sk');
if (Astro.request.method === 'POST') {
const customer = await stripe.customers.create({
email: 'testcust@tester.local'
});
console.log(customer.id,'NEW CUSTOMER ID');
}
---
<form method="POST">
<button >Create New Customer</button>
</form>