Design comparison
SolutionDesign
Solution retrospective
The divider svg element extends over the width of its parent container when media query is applied. So, I hid the svg element and its parent container called ".divider".
Community feedback
- @viniciusshenri96Posted almost 2 years ago
Your project turned out great, delete all console.log() from then(), so your code will be cleaner, good job with the error message!
buttonEl.addEventListener('click', function() { fetch('https://api.adviceslip.com/advice') .then(response => response.json()) .then(data => { const {id, advice} = data.slip; headerEl.textContent = `Advice #${id}`; quoteEl.textContent = `"${advice}"`; }) .catch(error => { console.log(error); quoteEl.textContent = "Sorry. Couldn't get an advice at the moment." }); });
when you learn async/await, redo this challenge, and you'll see how much easier it gets.
0@shinaeliPosted almost 2 years ago@viniciusshenri96 Thank you very much for that. I will definitely do that.
0
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