From cf6da809621b4ebe8c9acedb035b689e7e1b60b1 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 25 Oct 2023 17:27:32 +0700
Subject: Update register page

---
 src-migrate/modules/register/components/FormCaptcha.tsx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 src-migrate/modules/register/components/FormCaptcha.tsx

(limited to 'src-migrate/modules/register/components/FormCaptcha.tsx')

diff --git a/src-migrate/modules/register/components/FormCaptcha.tsx b/src-migrate/modules/register/components/FormCaptcha.tsx
new file mode 100644
index 00000000..967be017
--- /dev/null
+++ b/src-migrate/modules/register/components/FormCaptcha.tsx
@@ -0,0 +1,14 @@
+import ReCaptcha from '~/common/components/elements/ReCaptcha'
+import { useRegisterStore } from '~/common/stores/useRegisterStore'
+
+const FormCaptcha = () => {
+  const { updateValidCaptcha } = useRegisterStore()
+
+  const handleCaptchaChange = (value: string | null) => {
+    updateValidCaptcha(value !== null)
+  }
+
+  return <ReCaptcha onChange={handleCaptchaChange} />
+}
+
+export default FormCaptcha
\ No newline at end of file
-- 
cgit v1.2.3

