import { ReCaptcha } from '~/components/ui/re-captcha'
import { useRegisterStore } from "../stores/useRegisterStore";

const FormCaptcha = () => {
  const { updateValidCaptcha } = useRegisterStore()

  const handleCaptchaChange = (value: string | null) => {
    updateValidCaptcha(value !== null)
  }

  return <ReCaptcha onChange={handleCaptchaChange} />
}

export default FormCaptcha