Advice Generator with tailwind CSS and Vanilla JS
Design comparison
Solution retrospective
Huh... submitting after a while.... been working on some stuff!! Well in this project I tried to implement my fetch learning..... but I guess there's some issue with the API fetching itself it works fine on chrome, but on firefox it fetches the same response again and again..... So a bit of help there would be appreciated!!!
Thanks for all your appreciation and advice, glad you made the effort to preview my project and point out areas of improvement..........
Community feedback
- @ZenitsuAgPosted about 1 year ago
Hello Nayan, how you doing today? Your code is amazing!! I like the animation, looks great, you can fix the issue you're facing in firefox with the piece of code.
- On line 8 of your
script.js
, you have this:
fetch('https://api.adviceslip.com/advice')
Update it to this
fetch('https://api.adviceslip.com/advice', { method: 'GET', mode: 'cors', cache: 'no-cache' })
The browser will stop retaining the old advice and give a new advice each time you ask.
-
It'll be better if all your code is inside a
landmark
tag likemain
footer
, you did this but you left out thebutton
's div. -
You can also center your content with
<body class="...other-classes flex justify-center items-center">
- The node_modules folder is not necessary in your repo, so you can remove it.
And that's all.
Happy Coding :)
Marked as helpful2@freaky4wrldPosted about 1 year ago@ZenitsuAg I'm doing great buddy, and with your help it's even better than great..... once again thanks for your remarks and I appreciate your effort..... Btw.........how you doing pal??
0@ZenitsuAgPosted about 1 year ago@freaky4wrld I'm doing great! Thanks for asking. I'm so happy that my remarks were useful to you and I see that you have also made changes. You may have to redeploy your site so that we can see the changes in your live site.
Have a nice day!
Happy Coding :)
0 - On line 8 of your
Please log in to post a comment
Log in with GitHubJoin 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