Skip to content

Commit

Permalink
fetch /names priority high
Browse files Browse the repository at this point in the history
  • Loading branch information
starsep committed Dec 28, 2023
1 parent 8617c68 commit ca31017
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export async function fetchCountriesData(
language: string,
): Promise<Array<Country> | null> {
const url = `${backendBaseUrl}/api/v1/countries/names?language=${language.toUpperCase()}`;
return fetch(url)
// @ts-ignore: Priority merged in TypeScript: https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1572
return fetch(url, { priority: "high" })
.then((response) => response.json())
.then((response: Array<BackendCountry>) =>
response.map((country: BackendCountry) => ({
Expand Down

0 comments on commit ca31017

Please sign in to comment.