feat: improve company forms, phone input, and auth redirects

This commit is contained in:
Esdras Renan 2025-10-16 23:35:20 -03:00
parent 6962d5e5b5
commit 604216ddec
3 changed files with 57 additions and 17 deletions

View file

@ -91,7 +91,7 @@ function placeholderFor(country: CountryOption): string {
return "Número de telefone"
}
export function PhoneInput({ value, onChange, className }: PhoneInputProps) {
export function PhoneInput({ value, onChange, className, id, name }: PhoneInputProps) {
const [selectedCountry, setSelectedCountry] = useState<CountryOption>(DEFAULT_COUNTRY)
const [localDigits, setLocalDigits] = useState<string>("")
@ -144,6 +144,8 @@ export function PhoneInput({ value, onChange, className }: PhoneInputProps) {
</SelectContent>
</Select>
<Input
id={id}
name={name}
type="tel"
value={displayValue}
onChange={handleInputChange}
@ -158,6 +160,8 @@ export type PhoneInputProps = {
value?: string | null
onChange?: (value: string) => void
className?: string
id?: string
name?: string
}
export function formatPhoneDisplay(rawValue?: string | null): string | null {