-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Fix spelling:
line 72-73
Line 72 in 9a4870f
| VITE_WEATHER_API_KEY = "Eenter your API key" |
line 82-85
Line 82 in 9a4870f
| - [x] Show weather forcast for a city (current and the next 6 days) |
I like what you did on setting up relative paths for imports
Line 5 in 9a4870f
| import Cities from "@/components/Cities"; |
console logs shouldnt be left hanging in code especially if unnecessary, it can bloat code and is a synchronous method
Line 23 in 9a4870f
| console.log("in app", info); |
I think personally this is a great way of using state management in a simple way. But usually in a real world project, we use redux/react context, and it scales well for bigger apps. So next time, I recommend you trying that way
weatherApp/src/utils/storage.js
Line 7 in 9a4870f
| setItem: (id, data) => { |
In real world projects, we dont need these console logs lying around
weatherApp/src/utils/geolocation.js
Line 11 in 9a4870f
| console.log("Your current position is:", pos); |
| console.log(item); |
| console.log("in weather infos", current, daily); |
weatherApp/src/hooks/useFetchData.js
Line 14 in 9a4870f
| console.log("in useFetchData", JSON.stringify(result, {}, 2)); |
are we sure that item.value["_embedded"] always has ["city:item"] ? You should check that first
| const cityItem = item.value["_embedded"]["city:item"]; |
line 26-32: this is the reason why you should use state management tools, you're being redundant here with storing in your utils/storage and in the component state
| storage.setItem("cityInfo", { |
you gotta be careful with misspellings, this is important for product owners and business
| <h2 className="cities--text">or selete a location</h2> |
what is this empty file for?
https://github.com/amineProjects/weatherApp/blob/9a4870f5b82167303e7e17dcf1b451b28a18ee28/src/components/Cities/CitySelector.jsx
why have an index.js then just to import the other file? Why not use the index.js only?
| import CityInfos from "./CityInfos"; |
these careless misspellings are really not good
| }, [statu, hour]); |