Commit ab9111d4 authored by EnesKarakas's avatar EnesKarakas
Browse files

adw

parent f31da304
......@@ -245,9 +245,6 @@ const Currentdata = (props) => {
<br />
<input className="input" type="text" id="apiUrloutput" readOnly />
</div>
<button className="APIButton" onClick={searchAPI}>
City api
</button>
<br />
<br />
</div>
......@@ -257,7 +254,7 @@ const Currentdata = (props) => {
);
function getData() {
//switch
//switch
const units = document.getElementById("units").value;
const city_text = document.getElementById("city_text").value;
......@@ -315,7 +312,7 @@ const Currentdata = (props) => {
).checked;
let filterArray = [];
if (name) {
filterArray.push("name");
}
......@@ -347,8 +344,8 @@ const Currentdata = (props) => {
filterArray.push("last_updated");
}
if (temp) {
if(units == world){
filterArray.push("temp_f");
if (units == world) {
filterArray.push("temp_c");
}
filterArray.push("temp_f");
}
......@@ -366,7 +363,7 @@ const Currentdata = (props) => {
filterArray.push("condition_code");
}
if (wind) {
if(units == world){
if (units == world) {
filterArray.push("wind_mph");
}
filterArray.push("wind_kph");
......@@ -378,14 +375,15 @@ const Currentdata = (props) => {
filterArray.push("wind_dir");
}
if (pressure) {
if(units == world){
if (units == world) {
filterArray.push("temp_mb");
}
filterArray.push("pressure_in");
}
if (precip) {if(units == world){
filterArray.push("temp_mm");
}
if (precip) {
if (units == world) {
filterArray.push("temp_mm");
}
filterArray.push("precip_in");
}
if (humidity) {
......@@ -395,31 +393,31 @@ const Currentdata = (props) => {
filterArray.push("cloud");
}
if (feelslike) {
if(units == world){
if (units == world) {
filterArray.push("feelslike_c");
}
filterArray.push("feelslike_f");
}
if (windchill) {
if(units == world){
if (units == world) {
filterArray.push("windchill_c");
}
filterArray.push("windchill_f");
}
if (heatindex) {
if(units == world){
if (units == world) {
filterArray.push("heatindex_c");
}
filterArray.push("heatindex_f");
}
if (dewpoint) {
if(units == world){
if (units == world) {
filterArray.push("dewpoint_c");
}
filterArray.push("dewpoint_f");
}
if (vis) {
if(units == world){
if (units == world) {
filterArray.push("vis_miles");
}
filterArray.push("vis_miles");
......@@ -428,7 +426,7 @@ const Currentdata = (props) => {
filterArray.push("uv");
}
if (gust) {
if(units == world){
if (units == world) {
filterArray.push("gust_kph");
}
filterArray.push("gust_mph");
......
......@@ -184,9 +184,6 @@ const HistoricalWeatherData = (props) => {
<br />
<input className="input" type="text" id="apiUrloutput" readOnly />
</div>
<button className="APIButton" onClick={searchAPI}>
City api
</button>
<br />
<br />
</div>
......
......@@ -314,9 +314,6 @@ const WeatherForecastData = (props) => {
readOnly
/>
</div>
<button className="APIButton" onClick={searchAPI}>
City api
</button>
<br />
<br />
</div>
......
Markdown is supported
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