landing page added

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-04-01 01:22:31 +05:00
parent 291375ce02
commit 80343c9ca8
34 changed files with 1262 additions and 49 deletions

View File

@@ -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 (