Merged in chore/SW-3145-move-phone (pull request #2549)
chore/SW-3145 Moved Phone to design system * chore/SW-3145 Moved Phone to design system * chore: SW-3145 Moved phone and removed intl direct dependency Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Lang } from "@scandic-hotels/common/constants/language"
|
||||
import { ApiLang } from "@scandic-hotels/trpc/constants/apiLang"
|
||||
|
||||
import type { LowerCaseCountryCode } from "@/types/components/form/phone"
|
||||
import type { CountryCode } from "libphonenumber-js"
|
||||
|
||||
export const languages: Record<Lang, string> = {
|
||||
[Lang.da]: "Dansk",
|
||||
@@ -82,8 +82,8 @@ export function getLocalizedLanguageOptions(currentLang: Lang) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getDefaultCountryFromLang(lang: Lang): LowerCaseCountryCode {
|
||||
const countryMap: Record<Lang, LowerCaseCountryCode> = {
|
||||
export function getDefaultCountryFromLang(lang: Lang): Lowercase<CountryCode> {
|
||||
const countryMap: Record<Lang, Lowercase<CountryCode>> = {
|
||||
sv: "se",
|
||||
da: "dk",
|
||||
fi: "fi",
|
||||
|
||||
Reference in New Issue
Block a user