mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -05:00
fix(ui): format phone number (#2761)
This commit is contained in:
parent
396dce8c3d
commit
4d65db08b2
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ import { useSieMethods } from '@/hooks/use-sie';
|
||||||
import ErrorPage from '@/pages/ErrorPage';
|
import ErrorPage from '@/pages/ErrorPage';
|
||||||
import { UserFlow } from '@/types';
|
import { UserFlow } from '@/types';
|
||||||
import { passcodeStateGuard, passcodeMethodGuard, userFlowGuard } from '@/types/guard';
|
import { passcodeStateGuard, passcodeMethodGuard, userFlowGuard } from '@/types/guard';
|
||||||
|
import { formatPhoneNumberWithCountryCallingCode } from '@/utils/country-code';
|
||||||
|
|
||||||
type Parameters = {
|
type Parameters = {
|
||||||
type: UserFlow;
|
type: UserFlow;
|
||||||
|
@ -47,7 +48,7 @@ const Passcode = () => {
|
||||||
description="description.enter_passcode"
|
description="description.enter_passcode"
|
||||||
descriptionProps={{
|
descriptionProps={{
|
||||||
address: t(`description.${method === 'email' ? 'email' : 'phone_number'}`),
|
address: t(`description.${method === 'email' ? 'email' : 'phone_number'}`),
|
||||||
target,
|
target: method === 'email' ? target : formatPhoneNumberWithCountryCallingCode(target),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<PasscodeValidation
|
<PasscodeValidation
|
||||||
|
|
Loading…
Add table
Reference in a new issue