Skip to content

Commit

Permalink
Prefer country name aliases over official names (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
InfiniteStash authored May 10, 2022
1 parent c8aef43 commit 60d6b58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { PerformerSchema, PerformerFormData } from "./schema";
import { InitialPerformer } from "./types";

Countries.registerLocale(english);
const CountryList = Countries.getNames("en");
const CountryList = Countries.getNames("en", { select: "alias" });

type OptionEnum = {
value: string;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/country.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ export const getISOCountry = (country: string | null | undefined) => {

export const getCountryByISO = (iso?: string | null) => {
if (!iso) return null;
const country = Countries.getName(iso, "en");
const country = Countries.getName(iso, "en", { select: "alias" });
return country ?? null;
};

0 comments on commit 60d6b58

Please sign in to comment.