Skip to content

Commit

Permalink
Fix variable naming case convention
Browse files Browse the repository at this point in the history
  • Loading branch information
jdudley1123 committed Dec 2, 2024
1 parent 0077175 commit 27f3527
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/javascript/controllers/map_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export default class MapController extends Controller {
}

async updateZoneLabels() {
const pollutant_forecasts = await this.getForecastData();
const pollutantForecasts = await this.getForecastData();

// Remove existing zone labels
this.layers.zoneLabels?.forEach((marker) => this.map.removeLayer(marker));
Expand All @@ -257,13 +257,13 @@ export default class MapController extends Controller {
lat: zone.properties.center[1],
lng: zone.properties.center[0],
};
const pollutant_value = pollutant_forecasts[zone.properties.name];
const pollutantValue = pollutantForecasts[zone.properties.name];

const marker = L.marker(center, {
icon: L.divIcon({
className:
"zone-label " + `zone-label-level-${zone.properties.level}`,
html: `<div class="wrapper"><span class="daqi-indicator daqi-level-${pollutant_value}">${pollutant_value}</span><span class="zone-name">${zone.properties.name}</span></div>`,
html: `<div class="wrapper"><span class="daqi-indicator daqi-level-${pollutantValue}">${pollutantValue}</span><span class="zone-name">${zone.properties.name}</span></div>`,
}),
});
marker.addTo(this.map);
Expand Down Expand Up @@ -307,7 +307,7 @@ export default class MapController extends Controller {
const date = this.daySelectorTarget.value;

const response = await fetch(
`/pollutant_forecasts?pollutant=${pollutant}&date=${date}`
`/pollutantForecasts?pollutant=${pollutant}&date=${date}`
);
return response.json();
}
Expand Down

0 comments on commit 27f3527

Please sign in to comment.