fix: allow any type of phone number
This commit is contained in:
committed by
Michael Zetterberg
parent
79e669020a
commit
9580281421
@@ -1,3 +1,5 @@
|
||||
import type { LowerCaseCountryCode } from "@/types/components/form/phone"
|
||||
|
||||
export enum Lang {
|
||||
da = "da",
|
||||
de = "de",
|
||||
@@ -106,3 +108,15 @@ export function getLocalizedLanguageOptions(currentLang: Lang) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getDefaultCountryFromLang(lang: Lang): LowerCaseCountryCode {
|
||||
const countryMap: Record<Lang, LowerCaseCountryCode> = {
|
||||
sv: "se",
|
||||
da: "dk",
|
||||
fi: "fi",
|
||||
no: "no",
|
||||
de: "de",
|
||||
en: "se", // Default to Sweden for English
|
||||
}
|
||||
return countryMap[lang] || "se"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user