@AdityaSurve
Submitted
@AlekseiBestuzhev
@AdityaSurve
Submitted
@AlekseiBestuzhev
Posted
Hello.
Congratulations on completing this difficult task. Cool start page. 🔥
There are a few items that need fixing:
try:
const className = "border-2 px-2 py-0 md:px-3 md:py-2 rounded-sm ${
darkMode
? 'bg-darkBlue border-veryDarkBlue2 text-white'
: 'bg-white border-darkGray text-darkGray'
}";
Note that I intentionally used double quotes (should be backticks) to correctly apply text formatting.
instead:
className={
darkMode
? "bg-darkBlue border-2 border-veryDarkBlue2 text-white px-2 py-0 md:px-3 md:py-2 rounded-sm"
: "bg-white border-2 border-darkGray text-darkGray px-2 py-0 md:px-3 md:py-2 rounded-sm "
}
Find the common and apply the ternary operator only to the different parameters. The same can be done inside the transfer of props.
I hope this will be helpful. Good luck!🤚
Marked as helpful
@F4YY
Submitted
@AlekseiBestuzhev
Posted
Hello.
Otherwise great, keep it up!👍
Marked as helpful
@deep0133
Submitted
@AlekseiBestuzhev
Posted
Hello.
Generally, good project! 👏
Good luck!
@jCasia
Submitted
Hello Everyone! 😀
I really wanted to challenge myself and wanted to develop something that will help me practice working with API requests. So I ended up starting my first Advanced level challenge and WOW a challenge I definitely got. It took me quite a long time to create but was worth it in the end!
Coding and creating the pages, components and styles were fine but adding the functionalities were difficult indeed. After many errors and bugs, I finally managed to get it to work! However, it may need a little bit more work and maybe some refactoring in the future. Other than that, it was fun to code and I have learnt quite a lot by doing this challenge.
I encourage everyone to give higher level challenges a go! Yes it will take more time and possibly harder, but I guarantee you, that you will learn few or more things along the way!
Any feedbacks or suggestions are always welcome!😀
@AlekseiBestuzhev
Posted
Hello.
👏 Well done for completing this challenging project. Good luck!
Marked as helpful
@sebasdex
Submitted
This is my first project in a more advanced way during this time of learning. I would like to continue learning and I hope you can give me feedback on how I could improve this project. Thank you.
@AlekseiBestuzhev
Posted
Hello.
flex-wrap: wrap;
Well done for completing this challenging project. Good luck!
Marked as helpful
@timbosTours
Submitted
I had a lot of fun doing this challenge. Once again, Frontend mentor comes up with the educational goods. I Got to learn how to make a dark theme with Tailwind and next-themes. I Got to build out a big typescript interface for the API data. I decided to give Tailwind another go, It definitely makes styling fast, despite the extra clutter in the .tsx files.
Thanks Frontend Mentor!
@AlekseiBestuzhev
Posted
Hello.
Try to open China and you will see the error. This is due to the fact that you are using the search by name. From the documentation: "Search by country name. If you want to get an exact match, use the next endpoint. It can be the common or official value". China and Taiwan have the match in the official name, and in the response array from the server, Taiwan comes after China and displays Taiwan. Same situation with South Georgia and Georgia.
When I open Antarctica, the app crashes. Check the console.
Not all properties exist in all countries, this should be taken into account in the typing. The capital of Antarctica, for example. You need to handle their absence.
Images on the main page have different heights.
When I use the region filter, the selected region is not displayed. There is no way to reset the filter. I would also advise not to make a new request, instead it is better to filter.
Missing region Antarctica.
Well done for completing this challenging project. Good luck!
Marked as helpful
For this project use react router since I am learning how to use it, I am still learning about react router to be able to use it correctly, if you have a tip or any questions, feel free to write as it would help me too
@AlekseiBestuzhev
Posted
Hello.
When you open a country-specific page in border countries, you have languages in their native script. There should be countries in the form of buttons that send to the country page.
Also, I would advise you to send requests to the server. Or if you still want to receive data from a file, then I would move the loader function to the utils folder. I would also change
if (filter !== null && filter !== "") {...}
to
if (filter) {...}
And don't forget to handle the missing fields. Like the capital of Antarctica. Good luck!
Marked as helpful
@gauyash
Submitted
@AlekseiBestuzhev
Posted
Hello. Try to open China and you will see an error. This is due to the fact that you are using the search by name. From the documentation: "Search by country name. If you want to get an exact match, use the next endpoint. It can be the common or official value". China, Macau, Hong Kong and Taiwan have a match in the official name, and in the response array from the server all 4 come and they are all displayed on the page
Marked as helpful
@JiMare
Submitted
@AlekseiBestuzhev
Posted
Hello. Try to open China and you will see the error. This is due to the fact that you are using the search by name. From the documentation: "Search by country name. If you want to get an exact match, use the next endpoint. It can be the common or official value". China and Taiwan have the match in the official name, and in the response array from the server, Taiwan comes after China and displays Taiwan. Same situation with South Georgia and Georgia
Marked as helpful