diff options
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); }; |
