From 2e496411a387493e87087d90deb4ed5efe3c3417 Mon Sep 17 00:00:00 2001 From: Renard Date: Wed, 25 Sep 2019 15:33:33 -0300 Subject: Variable destructuring ✨ --- src/Board.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/Board.js') diff --git a/src/Board.js b/src/Board.js index 593f766..048cb00 100644 --- a/src/Board.js +++ b/src/Board.js @@ -97,6 +97,7 @@ class Board extends Component { render() { const { isLoaded, error, threadList, loadingMore, endReached } = this.state; + const { boardList, dir, nightMode } = this.props; if (error != null) { return ( @@ -117,11 +118,10 @@ class Board extends Component { ); } - const currentBoard = this.props.boardList.find(board => { - return board.dir === this.props.dir; + const currentBoard = boardList.find(board => { + return board.dir === dir; }); document.title = currentBoard.name + " - B.a.I"; - const nightMode = this.props.nightMode; return ( @@ -143,9 +143,7 @@ class Board extends Component { {threadList.map(thread => (
- - {thread.subject} - + {thread.subject} {thread.total_replies} respuestas -- cgit v1.2.1-18-gbd029