From e06f8d027eaea3ab89b4fd301be46af3508b61b5 Mon Sep 17 00:00:00 2001 From: simeng-li Date: Thu, 14 Jul 2022 17:44:28 +0800 Subject: [PATCH] fix(ui): fix multiple libphonmenumber packed bug (#1544) fix multiple libphonmenumber packed bug --- packages/ui/src/hooks/use-phone-number.ts | 2 +- packages/ui/src/utils/country-code.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/hooks/use-phone-number.ts b/packages/ui/src/hooks/use-phone-number.ts index 763973c56..7686eeb5c 100644 --- a/packages/ui/src/hooks/use-phone-number.ts +++ b/packages/ui/src/hooks/use-phone-number.ts @@ -14,7 +14,7 @@ import { useState } from 'react'; import { getDefaultCountryCallingCode, getCountryList } from '@/utils/country-code'; -export type { CountryCallingCode } from 'libphonenumber-js'; +export type { CountryCallingCode } from 'libphonenumber-js/mobile'; export type CountryMetaData = { countryCode: CountryCode; diff --git a/packages/ui/src/utils/country-code.ts b/packages/ui/src/utils/country-code.ts index d90eb2c87..d19633166 100644 --- a/packages/ui/src/utils/country-code.ts +++ b/packages/ui/src/utils/country-code.ts @@ -4,7 +4,7 @@ import { CountryCode, CountryCallingCode, getCountryCallingCode, -} from 'libphonenumber-js'; +} from 'libphonenumber-js/mobile'; export const fallbackCountryCode = 'US';