From 6a1d09aede3440a367ff575212eef97232f4369d Mon Sep 17 00:00:00 2001 From: Renard Date: Mon, 16 Sep 2019 16:18:47 -0300 Subject: Post ID segĂșn tipo de board --- src/Board.js | 4 ++-- src/Post.js | 16 ++++++++++------ src/Thread.js | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Board.js b/src/Board.js index 1e1d8b5..b88f160 100644 --- a/src/Board.js +++ b/src/Board.js @@ -101,7 +101,7 @@ class Board extends Component { post={thread} locked={thread.locked} threadId={thread.id} - dir={this.props.dir} + currentBoard={currentBoard} /> {thread.replies.map((reply, index, replies) => ( @@ -110,8 +110,8 @@ class Board extends Component { post={reply} locked={thread.locked} threadId={thread.id} - dir={this.props.dir} key={index} + currentBoard={currentBoard} /> ))} diff --git a/src/Post.js b/src/Post.js index 4ccb7d0..162afca 100644 --- a/src/Post.js +++ b/src/Post.js @@ -23,7 +23,7 @@ const ImageModal = ({ href, trigger }) => ( ); -const Post = ({ index, post, locked, dir, threadId }) => { +const Post = ({ index, post, locked, threadId, currentBoard }) => { if (post.IS_DELETED > 0) { return ( @@ -31,7 +31,9 @@ const Post = ({ index, post, locked, dir, threadId }) => { src={`https://bienvenidoainternet.org/static/css/img/picnicbdy.gif`} /> - #{index + 1} + + #{currentBoard.board_type === 0 ? post.id : index + 1} +
@@ -62,7 +64,7 @@ const Post = ({ index, post, locked, dir, threadId }) => { /> - #{index + 1}{" "} + #{currentBoard.board_type === 0 ? post.id : index + 1}{" "} @@ -86,12 +88,12 @@ const Post = ({ index, post, locked, dir, threadId }) => { {post.file !== "" ? (
} /> @@ -100,7 +102,9 @@ const Post = ({ index, post, locked, dir, threadId }) => {
) : null}
diff --git a/src/Thread.js b/src/Thread.js index e4694b7..058f0b5 100644 --- a/src/Thread.js +++ b/src/Thread.js @@ -167,7 +167,7 @@ class Thread extends Component { index={index} post={post} locked={locked} - dir={this.props.dir} + currentBoard={currentBoard} threadId={id} /> ))} -- cgit v1.2.1-18-gbd029