From 62c97c50f92281c0f2a843e31fba97e259f7de22 Mon Sep 17 00:00:00 2001 From: Jon Waldstein Date: Mon, 7 Oct 2024 15:55:41 -0400 Subject: [PATCH] chore: add ref type --- src/FormExtension/DonationForm/resources/js/TurnstileField.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FormExtension/DonationForm/resources/js/TurnstileField.tsx b/src/FormExtension/DonationForm/resources/js/TurnstileField.tsx index 8b242a7..eaff615 100644 --- a/src/FormExtension/DonationForm/resources/js/TurnstileField.tsx +++ b/src/FormExtension/DonationForm/resources/js/TurnstileField.tsx @@ -1,3 +1,4 @@ +import type {TurnstileInstance} from '@marsidev/react-turnstile'; import {Turnstile} from '@marsidev/react-turnstile'; import {__} from '@wordpress/i18n'; import {useCallback, useEffect, useRef} from 'react'; @@ -13,7 +14,7 @@ export default function TurnstileField({ fieldError, inputProps }) { - const ref = useRef(); + const ref = useRef(null); const { setValue, setError } = window.givewp.form.hooks.useFormContext(); const { submitCount } = window.givewp.form.hooks.useFormState(); const setFormError = useCallback(() =>