landing page added
This commit is contained in:
@@ -63,6 +63,7 @@ function Field({
|
||||
}
|
||||
|
||||
export function RegisterFormUI() {
|
||||
const [phone, setPhone] = React.useState('');
|
||||
const {
|
||||
registerData,
|
||||
errors,
|
||||
@@ -71,16 +72,22 @@ export function RegisterFormUI() {
|
||||
handleChange,
|
||||
handleOferta,
|
||||
handleSubmit,
|
||||
setItem,
|
||||
} = useRegisterForm();
|
||||
const [phone, setPhone] = React.useState(registerData.phone || '');
|
||||
const [isFocused, setIsFocused] = React.useState(false);
|
||||
const handlePhoneChange = useCallback(
|
||||
(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setPhone(normalizeDigits(e.target.value));
|
||||
if (normalizeDigits(e.target.value).length === 9)
|
||||
setItem('phone', `998${phone}`);
|
||||
},
|
||||
[setPhone],
|
||||
);
|
||||
|
||||
if (errors) {
|
||||
console.log('Validation errors:', errors);
|
||||
}
|
||||
|
||||
// ── Success state ──────────────────────────────────────
|
||||
if (success) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user