Skip to content

Commit

Permalink
Merge fee21c5 into 49cb852
Browse files Browse the repository at this point in the history
  • Loading branch information
patw0929 committed Dec 16, 2018
2 parents 49cb852 + fee21c5 commit 3fcea82
Show file tree
Hide file tree
Showing 10 changed files with 340 additions and 208 deletions.
3 changes: 2 additions & 1 deletion config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ function getClientEnvironment(publicUrl) {
env[key] = JSON.stringify(process.env[key]); // eslint-disable-line no-param-reassign

return env;
}, {
},
{
// Useful for determining whether we’re running in production mode.
// Most importantly, it switches React into the correct mode.
NODE_ENV: NODE_ENV,
Expand Down
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@
"linters": {
"*.js": [
"yarn prettier --write",
"git add",
"yarn eslint"
"yarn run eslint -- --fix",
"git add"
],
"src/**/*.js": [
"yarn jest --bail --findRelatedTests"
"yarn run test -- --bail --findRelatedTests"
]
}
},
Expand Down Expand Up @@ -163,8 +163,5 @@
"engines": {
"node": ">=6.2.2"
},
"eslintConfig": {
"extends": "./config/eslint.js"
},
"license": "MIT"
}
14 changes: 7 additions & 7 deletions src/components/CountryList.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export default class CountryList extends Component {

this.listElement.style.top = cssTop;
this.listElement.setAttribute('class', 'country-list');
}
};

setFlag = (iso2) => {
setFlag = iso2 => {
this.props.setFlag(iso2);
}
};

appendListItem = (countries, isPreferred = false) => {
const preferredCountriesCount = this.props.preferredCountries.length;
Expand Down Expand Up @@ -106,21 +106,21 @@ export default class CountryList extends Component {

<span className="country-name">{country.name}</span>
<span className="dial-code">
+
+
{country.dialCode}
</span>
</li>
);
});
}
};

handleMouseOver = (e) => {
handleMouseOver = e => {
if (e.currentTarget.getAttribute('class').indexOf('country') > -1) {
const selectedIndex = utils.retrieveLiIndex(e.currentTarget);

this.props.changeHighlightCountry(true, selectedIndex);
}
}
};

render() {
let options = '';
Expand Down
Loading

0 comments on commit 3fcea82

Please sign in to comment.