summaryrefslogtreecommitdiff
path: root/src-migrate/modules/register/index.tsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-08-26 10:28:15 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-08-26 10:28:15 +0700
commitf0cde08a3fda95b1738a765358022241aea404bf (patch)
treec2cf2cb3e07154d04672f3b9d0667753f8487764 /src-migrate/modules/register/index.tsx
parent0bca1bfb2bc7e52a31dde39602dd599d7c640e73 (diff)
<iman> update logic new register validation
Diffstat (limited to 'src-migrate/modules/register/index.tsx')
-rw-r--r--src-migrate/modules/register/index.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src-migrate/modules/register/index.tsx b/src-migrate/modules/register/index.tsx
index da41a5bb..5df2476e 100644
--- a/src-migrate/modules/register/index.tsx
+++ b/src-migrate/modules/register/index.tsx
@@ -8,6 +8,7 @@ import Image from "next/image";
import IndoteknikLogo from "~/images/logo.png";
import AccountActivation from "../account-activation";
import { useState } from "react";
+import { useRegisterStore } from "./stores/useRegisterStore";
const LOGO_WIDTH = 150;
const LOGO_HEIGHT = LOGO_WIDTH / 3;
@@ -15,13 +16,20 @@ const LOGO_HEIGHT = LOGO_WIDTH / 3;
const Register = () => {
const [isIndividuClicked, setIsIndividuClicked] = useState(true);
const [isBisnisClicked, setIsBisnisClicked] = useState(false);
+ const {resetForm,
+ updateForm
+ } = useRegisterStore()
const handleIndividuClick = () => {
+ resetForm();
setIsIndividuClicked(true);
setIsBisnisClicked(false);
};
-
+
const handleBisnisClick = () => {
+ resetForm();
+ updateForm("is_terdaftar", 'false')
+ updateForm("type_acc", 'business')
setIsIndividuClicked(false);
setIsBisnisClicked(true);
};