import { useEffect, useRef } from 'react'; import { isValidPhoneNumber } from 'react-phone-number-input'; export default function InputPhone({ name, label, value, onChange, errorMsg, placeholder, className }) { const inputRef = useRef(null); useEffect(() => { if (inputRef.current) { inputRef.current.focus(); } }, []); const handleChange = (e) => { const newValue = e.target.value; onChange(newValue); }; return ( <>
{errorMsg}
}