REST Countries API with color theme switcher - REACT, JS, HTML, CSS
Design comparison
Solution retrospective
Hi all, having a little bit of trouble removing the whitespace for the URLs for the country cards. Any help is appreciated!
Community feedback
- @ApplePieGiraffePosted almost 4 years ago
Hi there, Sean B! π
Well done on this challenge! π Your solution looks good and works pretty well! π
A few things I suggest are,
- Adding
cursor: pointer
to the region selector (and the options in the drop-down menu) in the top-right corner of the page. - Adding
overflow-x: hidden
to thebody
(or something similar) to prevent a horizontal scroll bar from appearing along the bottom of the page in the desktop layout. π
Keep coding (and happy coding, too)! π
2@Sean-BradburyPosted almost 4 years ago@ApplePieGiraffe thank you soo much for your feedback to suggestions make complete sense to me and I have implemented them.
Can you offer any advice to clear the HTML issues coming up in the report?
Thanks again Sean
1@ApplePieGiraffePosted almost 4 years ago@Sean-Bradbury
Hey, Sean! I'm not very familiar with React (yet), but I think following abhik-b's advice might help (replacing the white space with
-
or_
might help because of what the solution report says). π0 - Adding
- @abhik-bPosted almost 4 years ago
Hi Sean B π, Fantastic job on this challenge π
- it looks amazing, I loved the
box-shadows
, filter transitions, search based filter - your site is very responsive , great job here π―
- giving some
align-items: center;
to.head-content
can make it look nicer - for small screens , giving the filter div
width:100%
can make it look a lot nicer - idk which whitespace you were talking about, I liked those cards
I took some inspirations from your site, Happy Coding π and *Keep contributing these fantastic * solutions π
1@Sean-BradburyPosted almost 4 years agoHi, @abhik-b thanks for your feedback. By whitespace I just mean the empty spaces within the image URL I get back from the API to display the image. I'm getting errors back and would like to clear the HTML issues.
0@abhik-bPosted almost 4 years ago@Sean-Bradbury Since you are using jsx , the easiest way to fix that might be
<img className="country-flag" src={props.flag.trim()} alt="" srcset={props.flag}/>
However I checked the report and it seems the problem is also elsewhere ( country details links )
href='/country/Γ land Islands'>
Aland Islands can be replaced with Aland_Islands, Bolivia (Plurinational State of) can be replaced with Bolivia_Plurinational_State_of
Then before fetching doing something like below can be helpful
match.params.id.replace('_',' ')
**Just a update ** I saw you actually encode your url , so that might fix the issues , without following my solution , so have you regenerated the reports ?
Hope this Helps π€
0 - it looks amazing, I loved the
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