Commit 4c3b8c9e authored by Weiser's avatar Weiser
Browse files

air wuality fix

parent dc32f29d
......@@ -299,11 +299,7 @@ const Currentdata = (props) => {
<div class="h3">
<h3>Air Quality</h3>
</div>
<input
type="checkbox"
id="air_quality_co"
className="checkBoxFilter"
/>
<input type="checkbox" id="air_quality_co"className="checkBoxFilter"/>
<label for="air_quality_co">Air Quality CO</label>
<br />
<input
......@@ -588,18 +584,7 @@ const Currentdata = (props) => {
filterArray.push("gust_mph");
}
}
if (
air_quality_co ||
air_quality_no2 ||
air_quality_o3 ||
air_quality_so2 ||
air_quality_pm2_5 ||
air_quality_pm10 ||
air_quality_us_epa_index ||
air_quality_gb_defra_index
) {
filterArray.push("air_quality");
}
console.log(air_quality_co);
if (air_quality_co) {
filterArray.push("co");
}
......@@ -628,7 +613,7 @@ const Currentdata = (props) => {
let filterString = filterArray.join(",");
const apiUrl = `http://localhost:8080/currentweather?q=${latitude_text},${longitude_text}&filter=${filterString}`;
console.log(apiUrl);
fetch(apiUrl)
.then((response) => {
if (!response.ok) {
......
......@@ -107,7 +107,7 @@ public class Current {
private BigDecimal gustKph = null;
@JsonProperty("air_quality")
private WeatherAirQuality airQuality = null;
private WeatherAirQuality airQuality = new WeatherAirQuality();
public Current lastUpdatedEpoch(Integer lastUpdatedEpoch) {
this.lastUpdatedEpoch = lastUpdatedEpoch;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment