0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

fix(ui): format phone number (#2761)

This commit is contained in:
simeng-li 2022-12-30 16:40:55 +08:00 committed by GitHub
parent 396dce8c3d
commit 4d65db08b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,7 @@ import { useSieMethods } from '@/hooks/use-sie';
import ErrorPage from '@/pages/ErrorPage';
import { UserFlow } from '@/types';
import { passcodeStateGuard, passcodeMethodGuard, userFlowGuard } from '@/types/guard';
import { formatPhoneNumberWithCountryCallingCode } from '@/utils/country-code';
type Parameters = {
type: UserFlow;
@ -47,7 +48,7 @@ const Passcode = () => {
description="description.enter_passcode"
descriptionProps={{
address: t(`description.${method === 'email' ? 'email' : 'phone_number'}`),
target,
target: method === 'email' ? target : formatPhoneNumberWithCountryCallingCode(target),
}}
>
<PasscodeValidation