Commit 06d9a846 authored by EnesKarakas's avatar EnesKarakas
Browse files

fes

parent a50ceffe
......@@ -316,9 +316,7 @@ const HistoricalWeatherData = (props) => {
let filterHourlyString = filterHourlyArray.join(",");
let filterDailyString = filterDailyArray.join(",");
const apiUrl = `http://localhost:8080/historicalweather?latitude=${latitude_text}&longitude=${longitude_text}&start_date=${start_date}&end_date=${end_date}&filterHourly=${filterHourlyString}&filterDaily=${filterDailyString}&temperature_unit=${temp_units}
&wind_speed_unit=${wind_units}&precipitation_unit=${prec_units}`;
const apiUrl = `http://localhost:8080/historicalweather?latitude=${latitude_text}&longitude=${longitude_text}&start_date=${start_date}&end_date=${end_date}&filterHourly=${filterHourlyString}&filterDaily=${filterDailyString}&temperature_unit=${temp_units}&wind_speed_unit=${wind_units}&precipitation_unit=${prec_units}`;
fetch(apiUrl)
.then((response) => {
if (!response.ok) {
......
......@@ -12,6 +12,7 @@ const WeatherForecastData = (props) => {
searchAPI(e.target.value.trim());
}
};
return (
<div className="home-container">
<div>
......@@ -325,6 +326,7 @@ const WeatherForecastData = (props) => {
</option>
</select>
</div>
<input type="range" min="-5" max="5" step="1.0" value="0" />
<div>
<button className="thq-button-filled" onClick={getData}>
Generate
......@@ -346,8 +348,6 @@ const WeatherForecastData = (props) => {
readOnly
/>
</div>
<br />
<br />
</div>
</div>
</div>
......@@ -574,8 +574,9 @@ const WeatherForecastData = (props) => {
let filterString = filterArray.join(",");
const apiUrl = `http://localhost:8080/forcastweather?q=${latitude_text},${longitude_text}&filter=${filterString}`;
const apiUrl = `http://localhost:8080/forecastweather?q=${latitude_text},${longitude_text}&filter=${filterString}`;
console.log(apiUrl);
fetch(apiUrl)
.then((response) => {
if (!response.ok) {
......@@ -641,4 +642,5 @@ const ListItem = ({ name, country, region, lat, lon }) => {
</div>
);
};
export default WeatherForecastData;
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