From 5a9210e560ca47d8f4d8c43b06fc93d1d064a6f6 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 10 Nov 2023 16:23:33 +0700
Subject: Add close on modal otp activation, change validation register schema,
 fix term and condition checkbox

---
 src-migrate/modules/register/components/Form.tsx | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

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

diff --git a/src-migrate/modules/register/components/Form.tsx b/src-migrate/modules/register/components/Form.tsx
index ddc3397f..dc9107b2 100644
--- a/src-migrate/modules/register/components/Form.tsx
+++ b/src-migrate/modules/register/components/Form.tsx
@@ -1,4 +1,4 @@
-import { ChangeEvent, useEffect, useMemo } from "react";
+import { ChangeEvent, useMemo } from "react";
 import { useMutation } from "react-query";
 import { useRegisterStore } from "~/common/stores/useRegisterStore";
 import { RegisterProps } from "~/common/types/auth";
@@ -8,7 +8,6 @@ import FormCaptcha from "./FormCaptcha";
 import { useRouter } from "next/router";
 import { UseToastOptions, useToast } from "@chakra-ui/react";
 import Link from "next/link";
-import { registerSchema } from "~/common/validations/auth";
 
 const Form = () => {
   const {
@@ -20,9 +19,7 @@ const Form = () => {
     validate,
   } = useRegisterStore()
 
-  const isFormValid = useMemo(() => {
-    return Object.keys(errors).length === 0
-  }, [errors])
+  const isFormValid = useMemo(() => Object.keys(errors).length === 0, [errors])
 
   const router = useRouter()
   const toast = useToast()
-- 
cgit v1.2.3

