From 86362ddf13f76fedab3e7f7a90ab1299a9c9303c Mon Sep 17 00:00:00 2001 From: Clementlgz Date: Thu, 16 Jun 2022 14:46:38 +0200 Subject: [PATCH] Clean code implementation --- src/Selection.js | 1 - src/components/portfolioPage/Corpora.jsx | 7 +++---- src/components/portfolioPage/Portfolio.jsx | 1 - src/components/portfolioPage/Status.jsx | 2 -- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Selection.js b/src/Selection.js index 39561c51..9a7ae530 100644 --- a/src/Selection.js +++ b/src/Selection.js @@ -106,7 +106,6 @@ export default class Selection { if ([...existingClause.selection, ...existingClause.exclusion].length === 0) this.selectionJSON.data.splice(this.selectionJSON.data.indexOf(existingClause), 1); } else { - console.log('add topic'); this.addTopic(topicID); } } diff --git a/src/components/portfolioPage/Corpora.jsx b/src/components/portfolioPage/Corpora.jsx index 59bde0de..147ba164 100644 --- a/src/components/portfolioPage/Corpora.jsx +++ b/src/components/portfolioPage/Corpora.jsx @@ -41,8 +41,8 @@ class Corpora extends Component { let count = this.props.items.length; let total = this.props.from; let listIds = this.props.ids.map((corpus) =>{ - corpus = 'corpus : '.concat(corpus); - return
{corpus}
; + let corpusFormated = 'corpus : '.concat(corpus); + return
{corpus}
; } ); return ( @@ -99,8 +99,7 @@ class Corpora extends Component { isChecked(corpus) { const selection = Selection.fromURI(); - let list = this.state.listCorpus; - return selection.isSelectedOrExcluded(corpus) !== 'Excluded' || list.length === 0; + return selection.isSelectedOrExcluded(corpus) !== 'Excluded'; } handleCorpusSelected(corpusId) { diff --git a/src/components/portfolioPage/Portfolio.jsx b/src/components/portfolioPage/Portfolio.jsx index 7003682b..df65d3ad 100644 --- a/src/components/portfolioPage/Portfolio.jsx +++ b/src/components/portfolioPage/Portfolio.jsx @@ -159,7 +159,6 @@ class Portfolio extends Component { [item] ).getAttributes() .map(([key, value]) => key.concat(' : ', value.replace('\'', '’'))); - console.log(result); return result; } diff --git a/src/components/portfolioPage/Status.jsx b/src/components/portfolioPage/Status.jsx index 73aa3412..2f37c7e3 100644 --- a/src/components/portfolioPage/Status.jsx +++ b/src/components/portfolioPage/Status.jsx @@ -21,7 +21,6 @@ class Status extends Component { .sort(filter) .map( t => { - console.log('t=', t); let res = (t.topic === null) ? Rubrique inconnue : ; return res; } @@ -38,7 +37,6 @@ class Status extends Component { } _getCandidate(id) { - console.log('id=', id); for (let v of this.props.candidates) { if (v[id]) { return v[id];