From d429a344ef34bb9289616dc7ca11c161fabce5d7 Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Fri, 16 Oct 2020 15:26:55 +0200 Subject: Refactor js arrow functions --- frontend/src/components/objects/Connection.js | 4 ++-- frontend/src/components/objects/ConnectionMatchedRules.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'frontend/src/components/objects') 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 this.onMatchedRulesSelected(rule.id)} name={rule.name} color={rule.color} small/>; }); -- cgit v1.2.3-70-g09d2