Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weather Api Implementations #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Weather Api Implementations #1

wants to merge 7 commits into from

Conversation

arbirali
Copy link
Owner

No description provided.

@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">

Choose a reason for hiding this comment

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

Let's search why do we use lang attribute and does browsers use it?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Specifies the language code for the element's content. link

index.html Outdated
<link rel="stylesheet" href="./dist/css/style.min.css">
</head>
<body>
<div id="root"></div>

Choose a reason for hiding this comment

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

Let's remove it if it's not being used anywhere

Copy link
Owner Author

Choose a reason for hiding this comment

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

Removed

@@ -0,0 +1,4515 @@
{

Choose a reason for hiding this comment

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

what is this lock file? when does it get updated?

Copy link
Owner Author

Choose a reason for hiding this comment

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

The goal of the package-lock.json file is to keep track of the exact version of every package that is installed so that a product is 100% reproducible in the same way even if packages are updated by their maintainers.

The dependencies versions will be updated in the package-lock.json file when you run the npm update.

Link

@@ -0,0 +1 @@
// Left Empty

Choose a reason for hiding this comment

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

let's remove this file we are not placing any constant in it

Copy link
Owner Author

Choose a reason for hiding this comment

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

Removed

import $ from 'jquery';

export default function handleError({response}) {

Choose a reason for hiding this comment

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

let's remove the extra line break

Copy link
Owner Author

Choose a reason for hiding this comment

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

Removed


$('#notFound').text(message).show();
$('#weatherDetails').hide();

Choose a reason for hiding this comment

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

let's remove the extra line break

Copy link
Owner Author

Choose a reason for hiding this comment

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

Removed

@@ -0,0 +1,17 @@
export default function getWeatherList (weatherList) {

Choose a reason for hiding this comment

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

let's remove the extra line breaks

Copy link
Owner Author

Choose a reason for hiding this comment

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

Removed

@@ -0,0 +1,17 @@
export default function getWeatherList (weatherList) {

Choose a reason for hiding this comment

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

We avoid, appending list, dic, map etc with the names and prefer a name that depicts what does it contain, for example weatherDetails

Copy link
Owner Author

Choose a reason for hiding this comment

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

Changed

@@ -0,0 +1,17 @@
export default function getWeatherList (weatherList) {

return weatherList.map( weather => {

Choose a reason for hiding this comment

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

let's re consider the name as per the above suggestion,weather

Copy link
Owner Author

Choose a reason for hiding this comment

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

Changed

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