fix: extrapolate phone number parsing for re-usage in edit profile
move error messages to message handler
This commit is contained in:
@@ -42,9 +42,9 @@ export default function Phone({
|
||||
const lang = useLang()
|
||||
const { formState, getFieldState, register, setValue } = useFormContext()
|
||||
const fieldState = getFieldState(name)
|
||||
const [phoneNumber, phoneNumberCC] = useWatch({
|
||||
const [phoneNumber, phoneNumberCC]: [string, string] = useWatch({
|
||||
name: [name, countrySelectorName],
|
||||
}) as [string, string]
|
||||
})
|
||||
|
||||
const { country, setCountry } = usePhoneInput({
|
||||
defaultCountry: phoneNumberCC
|
||||
|
||||
Reference in New Issue
Block a user