From 2e496411a387493e87087d90deb4ed5efe3c3417 Mon Sep 17 00:00:00 2001 From: Renard Date: Wed, 25 Sep 2019 15:33:33 -0300 Subject: Variable destructuring ✨ --- src/Thread.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Thread.js') diff --git a/src/Thread.js b/src/Thread.js index 5c42aaa..c4d4cbe 100644 --- a/src/Thread.js +++ b/src/Thread.js @@ -101,7 +101,7 @@ class Thread extends Component { render() { const { isLoading, error } = this.state; - const { nightMode } = this.props; + const { boardList, dir, nightMode } = this.props; if (isLoading) { return ( @@ -131,8 +131,8 @@ class Thread extends Component { id } = this.state.thread; - const currentBoard = this.props.boardList.find(board => { - return board.dir === this.props.dir; + const currentBoard = boardList.find(board => { + return board.dir === dir; }); document.title = subject + " - " + currentBoard.name + "@B.a.I"; @@ -185,7 +185,7 @@ class Thread extends Component { /> API Link -- cgit v1.2.1-18-gbd029