Show warning when Turnstile key is missing

This commit is contained in:
Calum Muir 2025-12-28 12:42:40 +00:00
parent 20df952aa5
commit ec3d9698b5

View file

@ -77,6 +77,13 @@ const turnstileSiteKey = import.meta.env.PUBLIC_TURNSTILE_SITE_KEY ?? "";
Send a message Send a message
</h2> </h2>
<form class="mt-4 space-y-4" action="/api/contact" method="post" data-contact-form> <form class="mt-4 space-y-4" action="/api/contact" method="post" data-contact-form>
{
!turnstileSiteKey && (
<p class="rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm font-semibold text-amber-900">
Turnstile is not configured. Set PUBLIC_TURNSTILE_SITE_KEY and redeploy to enable the form.
</p>
)
}
<div> <div>
<label class="block text-sm font-semibold text-black">Name</label> <label class="block text-sm font-semibold text-black">Name</label>
<input <input