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

Responsive advice generator that fetchs an API

@alexgabriel8

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


I accept any kind of feedback!

EDIT: Ignore the paragraph below, people already helped me fix my problem with Firefox!

Also I would like to know why my page ins't working correctly on Firefox. The page shows me an advice, but does not let me get another one.

Community feedback

@zougari47

Posted

Try this

fetch('https://api.adviceslip.com/advice', {
  cache: 'no-cache'
})

Marked as helpful

1

@HectorMartinDama

Posted

Hello @alexgabriel8, in your request to the api use this:

 fetch('https://api.adviceslip.com/advice/' + Math.floor(Math.random() * 200))

The random number is because if you do not indicate a specific advice, it does not work correctly, in your project change the advice when you click in the button five times

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