fix(SW-188): improve semantics, use hotel instead of attribute naming

This commit is contained in:
Chuma McPhoy
2024-08-14 08:27:56 +02:00
parent ed379202c8
commit 3a2a58a9ca
7 changed files with 24 additions and 25 deletions

View File

@@ -5,12 +5,3 @@ export function findLang(pathname: string) {
(l) => pathname.startsWith(`/${l}/`) || pathname === `/${l}`
)
}
/**
* Helper function to convert langs in uppercase or capitalized format (e.g. the Hotel endpoint)
* to to Lang enum.
*/
export function fromUppercaseToLangEnum(lang: string): Lang | undefined {
const lowerCaseLang = lang.toLowerCase()
return Object.values(Lang).find((l) => l === lowerCaseLang)
}