diff --git a/src/components/Search.vue b/src/components/Search.vue index e61541e..a93107b 100644 --- a/src/components/Search.vue +++ b/src/components/Search.vue @@ -39,6 +39,8 @@ export default { border: 0; background-color: inherit; color: inherit; + width: 80%; + outline: 0; } @media (min-width: 660px) { diff --git a/src/views/CountryPage.vue b/src/views/CountryPage.vue index 89aa0a2..b67ae95 100644 --- a/src/views/CountryPage.vue +++ b/src/views/CountryPage.vue @@ -48,12 +48,12 @@ export default { onMounted(async () => { try { - const countryResponse = await fetch(`https://restcountries.eu/rest/v2/name/${props.name}?fields=name;nativeName;population;region;subregion;capital;topLevelDomain;currencies;languages;borders;flag`) + const countryResponse = await fetch(`https://restcountries.com/v2/name/${props.name}?fields=name,nativeName,population,region,subregion,capital,topLevelDomain,currencies,languages,borders,flag`) country.value = await countryResponse.json() country.value = country.value[0] - alpha3Codes.value = country.value.borders.join(';') + alpha3Codes.value = country.value.borders.join(',') - const bordersResponse = await fetch(`https://restcountries.eu/rest/v2/alpha?codes=${alpha3Codes.value}`) + const bordersResponse = await fetch(`https://restcountries.com/v2/alpha?codes=${alpha3Codes.value}`) borderCountries.value = await bordersResponse.json() } catch(e) { error.value = e diff --git a/src/views/Home.vue b/src/views/Home.vue index 3dba175..506caeb 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -32,7 +32,7 @@ export default { onMounted(async () => { try { - const res = await fetch('https://restcountries.eu/rest/v2/all?fields=name;capital;region;population;flag;alpha3Code') + const res = await fetch('https://restcountries.com/v2/all?fields=name,capital,region,population,flag,alpha3Code') countries.value = await res.json() } catch(e) { error.value = e