fix: extrapolate phone number parsing for re-usage in edit profile

move error messages to message handler
This commit is contained in:
Christian Andolf
2025-06-12 16:45:26 +02:00
parent e645b15c6e
commit 9da986f554
11 changed files with 62 additions and 45 deletions

View File

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