From 10cd02d6fcc39c75b8db19a874cc0ba49b890376 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 9 Dec 2024 15:48:36 +0700
Subject: <iman> add dynamic to call component

---
 .../modules/register/components/RegistrasiBisnis.tsx  | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

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

diff --git a/src-migrate/modules/register/components/RegistrasiBisnis.tsx b/src-migrate/modules/register/components/RegistrasiBisnis.tsx
index ce4d3972..40caed65 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') {
-- 
cgit v1.2.3

