diff options
Diffstat (limited to 'src-migrate/modules/register/components')
| -rw-r--r-- | src-migrate/modules/register/components/FormBisnis.tsx | 5 | ||||
| -rw-r--r-- | src-migrate/modules/register/components/RegistrasiBisnis.tsx | 19 |
2 files changed, 2 insertions, 22 deletions
diff --git a/src-migrate/modules/register/components/FormBisnis.tsx b/src-migrate/modules/register/components/FormBisnis.tsx index 9f9f1ca5..0ead23ba 100644 --- a/src-migrate/modules/register/components/FormBisnis.tsx +++ b/src-migrate/modules/register/components/FormBisnis.tsx @@ -8,9 +8,6 @@ import { } from 'react'; import { useMutation } from 'react-query'; import { useRegisterStore } from '../stores/useRegisterStore'; -import { RegisterProps } from '~/types/auth'; -import { registerUser } from '~/services/auth'; -import { useRouter } from 'next/router'; import { Button, Checkbox, @@ -18,7 +15,6 @@ import { color, useToast, } from '@chakra-ui/react'; -import Link from 'next/link'; import getFileBase64 from '@/core/utils/getFileBase64'; import { Controller, useForm } from 'react-hook-form'; import HookFormSelect from '@/core/components/elements/Select/HookFormSelect'; @@ -76,7 +72,6 @@ const form: React.FC<FormProps> = ({ const [industries, setIndustries] = useState<industry_id[]>([]); const [companyTypes, setCompanyTypes] = useState<companyType[]>([]); - const router = useRouter(); const toast = useToast(); const emailRef = useRef<HTMLInputElement>(null); const businessNameRef = useRef<HTMLInputElement>(null); diff --git a/src-migrate/modules/register/components/RegistrasiBisnis.tsx b/src-migrate/modules/register/components/RegistrasiBisnis.tsx index 2a52170e..332c5358 100644 --- a/src-migrate/modules/register/components/RegistrasiBisnis.tsx +++ b/src-migrate/modules/register/components/RegistrasiBisnis.tsx @@ -1,19 +1,10 @@ -import { ChangeEvent, useEffect, useMemo, useState } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import FormBisnis from './FormBisnis'; import Form from './Form'; -import TermCondition from './TermCondition'; -import FormCaptcha from './FormCaptcha'; import { Radio, RadioGroup, Stack, Divider, Button } from '@chakra-ui/react'; import React from 'react'; import { ChevronDownIcon, ChevronRightIcon } from '@heroicons/react/24/outline'; import { useRegisterStore } from '../stores/useRegisterStore'; -import { useMutation } from 'react-query'; -import { RegisterProps } from '~/types/auth'; -import { registerUser } from '~/services/auth'; -import router from 'next/router'; -import { useRouter } from 'next/router'; -import { UseToastOptions, useToast } from '@chakra-ui/react'; -import Link from 'next/link'; interface FormProps { chekValid: boolean; buttonSubmitClick: boolean; @@ -28,13 +19,7 @@ const RegistrasiBisnis: React.FC<FormProps> = ({ const [isBisnisClicked, setisBisnisClicked] = useState(true); const [selectedValue, setSelectedValue] = useState('PKP'); const [selectedValueBisnis, setSelectedValueBisnis] = useState('false'); - const { form, isCheckedTNC, isValidCaptcha, errors, validate, updateForm } = - useRegisterStore(); - const isFormValid = useMemo(() => Object.keys(errors).length === 0, [errors]); - const toast = useToast(); - const mutation = useMutation({ - mutationFn: (data: RegisterProps) => registerUser(data), - }); + const { validate, updateForm } = useRegisterStore(); useEffect(() => { if (selectedValue === 'PKP') { |
