Skip to content

Eval 3 - Weather App#217

Open
meccacodes wants to merge 6 commits intoprojectshft:masterfrom
meccacodes:master
Open

Eval 3 - Weather App#217
meccacodes wants to merge 6 commits intoprojectshft:masterfrom
meccacodes:master

Conversation

@meccacodes
Copy link

No description provided.

@@ -0,0 +1,100 @@
body {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of the style here can be achieved with bootstrap
example: p-, border-, d-flex

Comment on lines +92 to +97
let geoUrl;
if (isValidZipCode(location)) {
geoUrl = `https://api.openweathermap.org/geo/1.0/zip?zip=${location}&appid=${apiKey}`;
} else {
geoUrl = `https://api.openweathermap.org/geo/1.0/direct?q=${location}&limit=1&appid=${apiKey}`;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use a ternary operator here

Suggested change
let geoUrl;
if (isValidZipCode(location)) {
geoUrl = `https://api.openweathermap.org/geo/1.0/zip?zip=${location}&appid=${apiKey}`;
} else {
geoUrl = `https://api.openweathermap.org/geo/1.0/direct?q=${location}&limit=1&appid=${apiKey}`;
}
const geoUrl = isValidZipCode(location) ? `https://api.openweathermap.org/geo/1.0/zip?zip=${location}&appid=${apiKey}` : `https://api.openweathermap.org/geo/1.0/direct?q=${location}&limit=1&appid=${apiKey}`;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants