I know i have to improve this solution, but i'm still pretty satisfied with the result, considering time i needed to do it. CSS is pretty confused. Found some bug. I used Vanilla JS but I want to retry this challenge using React, cause i'm pretty sure there is easier and cleaner way to handle states.
Bao Dang
@weebaoAll comments
- @TylerDurden230Submitted about 2 years ago@weebaoPosted about 2 years ago
Hey your app looks great! You probably need to adjust the CSS a bit more to make it look closer to the design but I think it's fine if the website looks good enough for you. You can hide the spinner in the input type number field by using this
/* Chrome, Safari, Edge, Opera */ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } /* Firefox */ input[type=number] { -moz-appearance: textfield; }
Hope this helps!
Marked as helpful1 - @charlesmiller0412Submitted about 2 years ago@weebaoPosted about 2 years ago
Love your website. You can use
fetch('https://api.adviceslip.com/advice', { cache: 'no-cache' })
instead of fetching with cache so that the advice will change every time you click instead of staying the same.Marked as helpful1