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

Advice Generator App

#sass/scss
Sam 230

@samd1a

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

Community feedback

P

@seapagan

Posted

Looks great, well done :)

One thing to look out for is that you would not see new advice in Firefox, and the button seems to do nothing because Firefox caches the response. To fix this, add {cache: 'no-store'} to your fetch command like so :

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

Also, perhaps remove the original placeholder text from your HTML in the 'advice' h2?- On the first load, you sometimes see a flash of the placeholder before the API returns the new Advice fragment. You can't leave H2 empty, though, as it may be tagged in the report; maybe put a space or a period?

Marked as helpful

0

Sam 230

@samd1a

Posted

@seapagan Thank you so much!

0

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