diff --git a/static/assets/common/localization.ts b/static/assets/common/localization.ts index 5b658cb..d96c850 100644 --- a/static/assets/common/localization.ts +++ b/static/assets/common/localization.ts @@ -1,5 +1,3 @@ -import { TopLevelDomain } from "ysdk"; - export const LanguageCode = { AF: "af", AM: "am", @@ -393,8 +391,6 @@ const TLD2LangCodeMap = { tm: "tk", ua: "uk", uz: "uz", -} as const; +} as Record; -export const domainToLanguageCode = ( - domain: T -): (typeof TLD2LangCodeMap)[T] => TLD2LangCodeMap[domain]; +export const domainToLanguageCode = (domain: string): string => TLD2LangCodeMap[domain] ?? "en";