diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-08-26 10:28:15 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-08-26 10:28:15 +0700 |
| commit | f0cde08a3fda95b1738a765358022241aea404bf (patch) | |
| tree | c2cf2cb3e07154d04672f3b9d0667753f8487764 /src-migrate/modules/register/index.tsx | |
| parent | 0bca1bfb2bc7e52a31dde39602dd599d7c640e73 (diff) | |
<iman> update logic new register validation
Diffstat (limited to 'src-migrate/modules/register/index.tsx')
| -rw-r--r-- | src-migrate/modules/register/index.tsx | 10 |
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); }; |
