From ae1b23b022bb5e9845c8a53ddee004cda897c43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 2 Nov 2020 11:20:00 +0100 Subject: [PATCH] Fixing some linter errors --- webapp/src/components/boardComponent.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/webapp/src/components/boardComponent.tsx b/webapp/src/components/boardComponent.tsx index 315677b43..579fa78c9 100644 --- a/webapp/src/components/boardComponent.tsx +++ b/webapp/src/components/boardComponent.tsx @@ -101,7 +101,7 @@ class BoardComponent extends React.Component { } render(): JSX.Element { - const {boardTree, showView, intl} = this.props + const {boardTree, showView} = this.props if (!boardTree || !boardTree.board) { return ( @@ -237,7 +237,7 @@ class BoardComponent extends React.Component { this.cardClicked(e, card) }} onDragStart={() => { - this.draggedCards = this.state.selectedCardIds.includes(card.id) ? this.state.selectedCardIds.map((id) => boardTree.allCards.find(o => o.id === id)) : [card] + this.draggedCards = this.state.selectedCardIds.includes(card.id) ? this.state.selectedCardIds.map((id) => boardTree.allCards.find((o) => o.id === id)) : [card] }} onDragEnd={() => { this.draggedCards = [] @@ -387,14 +387,14 @@ class BoardComponent extends React.Component { onClick={() => mutator.deletePropertyOption(boardTree, boardTree.groupByProperty, group.option)} /> - {Constants.menuColors.map((color) => - ( ( + mutator.changePropertyOptionColor(boardTree.board, boardTree.groupByProperty, group.option, color.id)} - />), - )} + /> + ))} { // Cmd+Shift+Click: Extend the selection const {boardTree} = this.props const orderedCardIds = boardTree.orderedCards().map((o) => o.id) - const lastCardId = selectedCardIds[selectedCardIds.length-1] + const lastCardId = selectedCardIds[selectedCardIds.length - 1] const srcIndex = orderedCardIds.indexOf(lastCardId) const destIndex = orderedCardIds.indexOf(card.id) - const newCardIds = (srcIndex < destIndex) ? orderedCardIds.slice(srcIndex, destIndex+1) : orderedCardIds.slice(destIndex, srcIndex+1) + const newCardIds = (srcIndex < destIndex) ? orderedCardIds.slice(srcIndex, destIndex + 1) : orderedCardIds.slice(destIndex, srcIndex + 1) for (const newCardId of newCardIds) { if (!selectedCardIds.includes(newCardId)) { selectedCardIds.push(newCardId) @@ -521,7 +521,7 @@ class BoardComponent extends React.Component { } else { // Shift+Click: add to selection if (selectedCardIds.includes(card.id)) { - selectedCardIds = selectedCardIds.filter((o) => o != card.id) + selectedCardIds = selectedCardIds.filter((o) => o !== card.id) } else { selectedCardIds.push(card.id) }