@AhmadIkhdair
Submitted
Open to feedback! Thank you!
@cmcrawford2
@AhmadIkhdair
Submitted
Open to feedback! Thank you!
@cmcrawford2
Posted
You've made an excellent calculator!
@cmcrawford2
Submitted
For some reason the margins don't look good on Chrome. They're fine on Firefox and Safari.
@cmcrawford2
Posted
Hi, Thanks for the advice! I am setting the box-sizing to border box and the margins to 0, but not the padding. I think the problem is that I've been using padding-inline: 2.5rem to set all my left-right margins. This is the same as padding 0 2.5rem or padding-left 2.5rem and padding-right 2.5rem. I don't think Chrome supports it. I could have set the padding on the body and have left it at that, then just changed it for tablet and desktop. Cris
@cmcrawford2
Submitted
React router was the way to go. I also used a custom hook from useContext to make a context provider so that I only had to load the country array once and then could access it from any component. I would appreciate anyone taking a look at the code and letting me know what I could have done better. I think the React code is pretty good, but the css is mediocre.
@cmcrawford2
Posted
I just realized that the back button or the browser back loses the filter and just shows all the countries again. Also, going back from a country selected by a border country button just goes back to the home page. I have to add some router code to fix this.