How slavikdelenko/weather_project works
This React weather app lets a user enter a city (defaulting to Lviv), fetches current conditions and forecast data, and presents them with a Celsius/Fahrenheit toggle and weather-matched video background. The main display and city detail component each call the weather hook, so the source indicates separate requests. The forecast view formats daily entries from the hook’s grouped forecast. Connections reflect the shown imports, calls, and state updates; external services are identified from the request URLs and video sources.
Main entry points: Weather.tsx Weather screen · CityWeather.tsx Current conditions · SearchCity.tsx City search · requests.ts Weather request hook
Components 10
Weather interface
- React entry
src/main.tsx - Weather screen
src/components/Weather.tsx - City search
src/components/SearchCity.tsx - Loading indicator
src/Loaders/Loaders.tsx
Weather presentation
- Current conditions
src/components/CityWeather.tsx - Daily forecast
src/components/WeeksWeather.tsx
Weather data
- Weather request hook
src/hooks/requests.ts
Other components
- User
- OpenWeather API
- Video host
Connections 12
- User → City search: enters city
src/components/SearchCity.tsx - React entry → Weather screen: renders
src/main.tsx - Weather screen → City search: renders
src/components/Weather.tsx - City search → Weather screen: sets city
src/components/SearchCity.tsx - Weather screen → Current conditions: renders with city
src/components/Weather.tsx - Weather screen → Weather request hook: requests weather
src/components/Weather.tsx - Current conditions → Weather request hook: requests weather
src/components/CityWeather.tsx - Weather request hook → OpenWeather API: requests conditions and forecast
src/hooks/requests.ts - Current conditions → Daily forecast: renders forecast
src/components/CityWeather.tsx - City search → Loading indicator: renders while loading
src/components/SearchCity.tsx - Current conditions → Loading indicator: renders while loading
src/components/CityWeather.tsx - Weather screen → Video host: loads background video
src/components/Weather.tsx