Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Countries using Tailwind CSS and React(with error unfortuntately)

Desktop design screenshot for the REST Countries API with color theme switcher coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
4advanced
View challenge

Design comparison


SolutionDesign

Solution retrospective


What specific areas of your project would you like help with?

Hi, guys!!

I have some problems with making the countries to show up and sorting them by regions once i choose an option! Any advice is welcome, and thanks in advance :))

Community feedback

Jonathanβ€’ 350

@Schnedi3

Posted

I see you are fetching "http://api.countrylayer.com/v2/all?access_key=${process.env.REACT_APP_ACCESS_KEY"

any reason?

Because the challenge says to fetch from: https://restcountries.com/v3.1/all

1

Jonathanβ€’ 350

@Schnedi3

Posted

@sksksk2024 I meant you are using this line (this api requires an acces key) :

const res = await fetch(http://api.countrylayer.com/v2/all?access_key=${process.env.REACT_APP_ACCESS_KEY});

and you should be usign this (this one is a public api):

const res = await fetch("https://restcountries.com/v3.1/all");

Marked as helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord