11 lines
312 B
TypeScript
11 lines
312 B
TypeScript
import { countries } from "@scandic-hotels/trpc/constants/countries"
|
|
|
|
import type { IntlShape } from "react-intl"
|
|
|
|
export function getFormattedCountryList(intl: IntlShape) {
|
|
return countries.map((country) => ({
|
|
...country,
|
|
displayName: intl.formatDisplayName(country.code, { type: "region" }),
|
|
}))
|
|
}
|