web: fix type errors

This commit is contained in:
dumbmoron
2024-09-03 10:20:29 +00:00
parent cef90219e0
commit 38ce64b310
3 changed files with 5 additions and 4 deletions

View File

@@ -8,11 +8,12 @@
let turnstileScript: HTMLElement;
onMount(() => {
if (!env.TURNSTILE_KEY) return;
const sitekey = env.TURNSTILE_KEY;
if (!sitekey) return;
turnstileScript.addEventListener("load", () => {
window.turnstile?.render(turnstileElement, {
sitekey: env.TURNSTILE_KEY,
sitekey,
"error-callback": (error) => {
console.log("turnstile error code:", error);
return true;