@TedJenkler
Posted
Hi again,
Great job on the project! I noticed you’re using Axios, which is a solid choice. To further clean up your code, consider placing Axios in a custom hook within a folder called hooks. This will improve code modularity and maintainability. Additionally, having a utils folder for Axios and other utilities, instead of components, can help avoid clutter and keep your project organized. This is especially helpful with SCSS, which is known for its modularity.
Regarding responsiveness, if this project is primarily for practicing API integration, that’s okay. However, if it’s intended for your portfolio, I’d suggest fine-tuning the responsiveness using SCSS breakpoints to fix any issues. This will enhance the overall user experience.
Keep up the great work!
Best, Teodor
@Kaddesh
Posted
Thank you again @TedJenkler. Do you think I fetched the Api correctly because using the solution I noticed that I was getting location far away from where I am. I believe the aim of the project is also for the user to be able to get their current location.
@TedJenkler
Posted
Good question @Kaddesh,
I see that the API is showing a location far from where I am, like an island in Greece (lol), but it aligns with the results from WhatIsMyIPAddress.com. It seems like the issue might be with the API itself.
For a more accurate location, consider using GPS-based geolocation instead of IP-based. While the Geolocation API might be a bit advanced or overkill for this project, it’s a great fallback for improving accuracy and a useful skill for deeper exploration.
Best, Teodor
@Kaddesh
Posted
Thank you @TedJenkler