import { useState } from "react" import { Button } from…
- User
import { useState } from "react" import { Button } from "../../ui-component/button/button.component" import { Input } from "../../ui-component/input/input.component" import styles from "./user-sign-up.styles.module.css" import { Checkbox } from "../../ui-component/checkbox/checkbox.component" import { Icon } from "../../ui-component/icon/icon.component" import PhoneInput from "react-phone-input-2" import "react-phone-input-2/lib/style.css" import { Welcome } from "./welcome.component" import { useModal } from "../../ui-component/modal"
export function UserSignUpCompany({ goBack, }: { goBack: (value: string) => void }) { // --------------------------------------------------------------------------- // states // --------------------------------------------------------------------------- const modal = useModal()
const [mode, setMode] = useState< "name" | "post" | "email" | "password" | "congratulation"
("name")
// --------------------------------------------------------------------------- // functions // ---------------------------------------------------------------------------
function onBack(step: string) { if (step === "name") { goBack(mode) } else if (step === "post") { setMode("name") } else if (step === "email") { setMode("post") } else if (step === "password") { setMode("email") } else if (step === "congratulation") { setMode("password") } }
// --------------------------------------------------------------------------- return ( <> <div className={styles.backIconWrap} onClick={() => { onBack(mode) }} > Back {/* --------------------------------------------------------------------------- /} {/ COMPANY NAME AND URL FOR COMPANY /} {/ --------------------------------------------------------------------------- */}
code - Assistant
Got it! It looks like the
UserSignUpCompanycomponent is a multi-step form for a company user to sign up. The different steps include entering the company name and URL, contact person and post, email and phone number, and finally creating a password.Feel free to ask any questions about this component or any other part of your project when you're ready. I'm here to help!
- User
- Assistant
- User
but inside UserSignUpEngineer component is also 4 underlines. What to do with the m ?
- Assistant