Add WhatsApp number to registration
Adds a WhatsApp number field to the registration form and includes it in the data sent to the webhook.
This commit is contained in:
parent
6750ecd20e
commit
006c2dacc4
@ -20,6 +20,7 @@ const RegisterForm = ({ isLoading, setIsLoading }: RegisterFormProps) => {
|
||||
const [nome, setNome] = useState('');
|
||||
const [empresa, setEmpresa] = useState('');
|
||||
const [email, setEmail] = useState('');
|
||||
const [whatsapp, setWhatsapp] = useState('');
|
||||
const [senha, setSenha] = useState('');
|
||||
const [confirmaSenha, setConfirmaSenha] = useState('');
|
||||
|
||||
@ -65,6 +66,7 @@ const RegisterForm = ({ isLoading, setIsLoading }: RegisterFormProps) => {
|
||||
nome,
|
||||
empresa,
|
||||
email,
|
||||
whatsapp,
|
||||
data_cadastro: new Date().toISOString(),
|
||||
origem: window.location.origin,
|
||||
};
|
||||
@ -139,6 +141,16 @@ const RegisterForm = ({ isLoading, setIsLoading }: RegisterFormProps) => {
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Input
|
||||
id="whatsapp"
|
||||
placeholder="WhatsApp (com DDD)"
|
||||
type="tel"
|
||||
value={whatsapp}
|
||||
onChange={(e) => setWhatsapp(e.target.value)}
|
||||
disabled={isLoading}
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Input
|
||||
id="senha"
|
||||
|
||||
@ -6,6 +6,7 @@ interface UserData {
|
||||
nome: string;
|
||||
empresa?: string;
|
||||
email: string;
|
||||
whatsapp?: string;
|
||||
data_cadastro: string;
|
||||
origem: string;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user