summaryrefslogtreecommitdiff
path: root/src-migrate/modules/register/components
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-12-24 08:51:37 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-12-24 08:51:37 +0700
commit22bf497d3fd524a95982e090f2c8a1be6bde656b (patch)
tree1c394154c78ea81e06b302eeffcb9dfb14497144 /src-migrate/modules/register/components
parentb2afb5c847c9983b098a3223fbcfdb666e65c8cb (diff)
parentd76f96c44f85e7e0efbd544e6b97bd80920b0039 (diff)
Merge branch 'new-release' into Feature/switch-account
# Conflicts: # src-migrate/modules/register/components/FormBisnis.tsx # src/lib/auth/components/Menu.jsx
Diffstat (limited to 'src-migrate/modules/register/components')
-rw-r--r--src-migrate/modules/register/components/FormBisnis.tsx5
-rw-r--r--src-migrate/modules/register/components/RegistrasiBisnis.tsx19
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') {