From 0344a73a53acf2847ad05cff6ba38244e9c875d7 Mon Sep 17 00:00:00 2001 From: smdthiranjaya Date: Sat, 6 Apr 2024 20:09:16 +0530 Subject: [PATCH] Clean modification --- src/App.js | 1 - src/components/MapComponent.js | 3 --- src/pages/WeatherPage.js | 5 +---- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/App.js b/src/App.js index 42713c6..95232ae 100644 --- a/src/App.js +++ b/src/App.js @@ -8,7 +8,6 @@ function App() { // Use the Router component to enable routing within the app - // Define the Routes for your application } /> {} diff --git a/src/components/MapComponent.js b/src/components/MapComponent.js index c5945fc..1a76d5e 100644 --- a/src/components/MapComponent.js +++ b/src/components/MapComponent.js @@ -10,9 +10,7 @@ const MapComponent = ({ weatherData }) => { // Return JSX for rendering the map return ( - // Add a TileLayer to the map with OpenStreetMap tiles - // Iterate over weatherData to create markers for each data point {weatherData.map(({ id, city, lat, lng, temperature, humidity, airPressure, wind_speed, weatherDescriptions, observationTime, weatherIcons, isDay }) => { const dynamicIcon = new L.Icon({ iconUrl: weatherIcons, @@ -24,7 +22,6 @@ const MapComponent = ({ weatherData }) => { // Render a Marker for each weather data point with a dynamic icon return ( - // Display a Popup with weather and city details for each marker {city} weather icon

Daytime: {isDay ? 'Yes' : 'No'}
diff --git a/src/pages/WeatherPage.js b/src/pages/WeatherPage.js index 7c4ecad..63add31 100644 --- a/src/pages/WeatherPage.js +++ b/src/pages/WeatherPage.js @@ -101,7 +101,7 @@ const WeatherPage = () => { }; fetchWeatherData(); - + // Set an interval to refresh weather data every 5 minutes const interval = setInterval(fetchWeatherData, 300000); @@ -111,7 +111,6 @@ const WeatherPage = () => { // Render the WeatherPage component with weather statistics, map, and subscription form return (
- // Display the app logo and header
Logo

Geo 360 Live

@@ -144,11 +143,9 @@ const WeatherPage = () => {

🔍 Avg: {weatherStats.windSpeed.avg.toFixed(1)}

- // Display weather statistics and a map with weather data markers
- // Subscription form for weather updates

Subscribe to Weather Updates