diff options
author | Emiliano Ciavatta | 2020-10-16 13:26:55 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-10-16 13:26:55 +0000 |
commit | d429a344ef34bb9289616dc7ca11c161fabce5d7 (patch) | |
tree | 664d56822eac93568f44c40ca25be725d1dd81c8 /frontend/src/components/objects | |
parent | 5534413b3a3e6e783310be8147ac8340d3098a7e (diff) |
Refactor js arrow functions
Diffstat (limited to 'frontend/src/components/objects')
-rw-r--r-- | frontend/src/components/objects/Connection.js | 4 | ||||
-rw-r--r-- | frontend/src/components/objects/ConnectionMatchedRules.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/components/objects/Connection.js b/frontend/src/components/objects/Connection.js index e5896e9..b70b7f7 100644 --- a/frontend/src/components/objects/Connection.js +++ b/frontend/src/components/objects/Connection.js @@ -37,7 +37,7 @@ class Connection extends Component { if (name === "hide") { const enabled = !this.props.data.hidden; backend.post(`/api/connections/${this.props.data.id}/${enabled ? "hide" : "show"}`) - .then(_ => { + .then((_) => { this.props.onEnabled(!enabled); this.setState({update: true}); }); @@ -45,7 +45,7 @@ class Connection extends Component { if (name === "mark") { const marked = this.props.data.marked; backend.post(`/api/connections/${this.props.data.id}/${marked ? "unmark" : "mark"}`) - .then(_ => { + .then((_) => { this.props.onMarked(!marked); this.setState({update: true}); }); diff --git a/frontend/src/components/objects/ConnectionMatchedRules.js b/frontend/src/components/objects/ConnectionMatchedRules.js index cfd1254..a69cad8 100644 --- a/frontend/src/components/objects/ConnectionMatchedRules.js +++ b/frontend/src/components/objects/ConnectionMatchedRules.js @@ -33,8 +33,8 @@ class ConnectionMatchedRules extends Component { }; render() { - const matchedRules = this.props.matchedRules.map(mr => { - const rule = this.props.rules.find(r => r.id === mr); + const matchedRules = this.props.matchedRules.map((mr) => { + const rule = this.props.rules.find((r) => r.id === mr); return <ButtonField key={mr} onClick={() => this.onMatchedRulesSelected(rule.id)} name={rule.name} color={rule.color} small/>; }); |