edit company-user registration

This commit is contained in:
smanylov
2026-02-05 19:31:06 +07:00
parent 8890cfb067
commit 777555c187
4 changed files with 60 additions and 19 deletions
+10 -3
View File
@@ -1,16 +1,23 @@
'use client'
import { useState, ChangeEvent } from 'react';
import { useState, ChangeEvent, useEffect } from 'react';
import { InputMask } from '@react-input/mask';
import styles from '@/app/styles/module/login.module.scss';
interface PhoneInputProps {
phoneState: string | undefined;
validateHandler: (e: ChangeEvent<HTMLInputElement>) => void;
clearCondition?: string | undefined | null
}
export default function PhoneInput({ phoneState, validateHandler }: PhoneInputProps) {
const [phone, setPhone] = useState(phoneState ? phoneState : '');
export default function PhoneInput({ phoneState, validateHandler, clearCondition }: PhoneInputProps) {
const [phone, setPhone] = useState<string | undefined>(phoneState ? phoneState : '');
useEffect(() => {
if (clearCondition) {
setPhone('');
}
}, [clearCondition])
return (
<InputMask