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

vite+react tailwind

P
One Solo 400

@Kasim-Ke

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

Fardin 310

@Fardindevm

Posted

I'm using firefox and your button doesn't generate new advice for me. If it work good for you so it's from firefox cache and users with firefox can't see it. Add this after your fetch code to fix it. { cache: "no-cache" } like: let response = await fetch("https://api.adviceslip.com/advice", { cache: "no-cache" }) That worked for me! if that hepled, please mark this comment as a helpful comment :)

Marked as helpful

0

P
One Solo 400

@Kasim-Ke

Posted

@Fardindevm thank you, you can also fix it by adding axios .get( https://api.adviceslip.com/advice?timestamp=${new Date().getTime()} ) this part ---> ${new Date().getTime()

1
Fardin 310

@Fardindevm

Posted

Thank you for sharing this knowledge with me. I checked that and it worked perfectly! @Kasim-Ke

Marked as helpful

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