diff options
author | Renard | 2019-09-16 16:18:47 -0300 |
---|---|---|
committer | Renard | 2019-09-16 16:18:47 -0300 |
commit | 6a1d09aede3440a367ff575212eef97232f4369d (patch) | |
tree | 2e8f279a4957cf4f2ccebb00e2496c1d58f8b3f3 /src/Post.js | |
parent | d0ccad14a773a5fce0efa2186453c73f3d1f9e9f (diff) | |
download | bai-client-6a1d09aede3440a367ff575212eef97232f4369d.tar.gz bai-client-6a1d09aede3440a367ff575212eef97232f4369d.tar.xz bai-client-6a1d09aede3440a367ff575212eef97232f4369d.zip |
Post ID segĂșn tipo de board
Diffstat (limited to 'src/Post.js')
-rw-r--r-- | src/Post.js | 16 |
1 files changed, 10 insertions, 6 deletions
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 }) => ( </Modal> ); -const Post = ({ index, post, locked, dir, threadId }) => { +const Post = ({ index, post, locked, threadId, currentBoard }) => { if (post.IS_DELETED > 0) { return ( <Comment> @@ -31,7 +31,9 @@ const Post = ({ index, post, locked, dir, threadId }) => { src={`https://bienvenidoainternet.org/static/css/img/picnicbdy.gif`} /> <Comment.Content> - <Comment.Author as="a">#{index + 1}</Comment.Author> + <Comment.Author as="a"> + #{currentBoard.board_type === 0 ? post.id : index + 1} + </Comment.Author> <Comment.Metadata> <div> <Moment fromNow unix locale="es" date={post.timestamp} /> @@ -62,7 +64,7 @@ const Post = ({ index, post, locked, dir, threadId }) => { /> <Comment.Content> <Comment.Author as="a"> - #{index + 1}{" "} + #{currentBoard.board_type === 0 ? post.id : index + 1}{" "} <span className={post.email === "sage" ? "username sage" : "username"} > @@ -86,12 +88,12 @@ const Post = ({ index, post, locked, dir, threadId }) => { {post.file !== "" ? ( <div className="imageContainer"> <ImageModal - href={`https://bienvenidoainternet.org/${dir}/src/${post.file}`} + href={`https://bienvenidoainternet.org/${currentBoard.dir}/src/${post.file}`} trigger={ <Image centered className="postImage" - src={`https://bienvenidoainternet.org/${dir}/thumb/${post.thumb}`} + src={`https://bienvenidoainternet.org/${currentBoard.dir}/thumb/${post.thumb}`} /> } /> @@ -100,7 +102,9 @@ const Post = ({ index, post, locked, dir, threadId }) => { </div> ) : null} <div - className={`postMessage ${dir === "zonavip" ? "vipFont" : null}`} + className={`postMessage ${ + currentBoard.dir === "zonavip" ? "vipFont" : null + }`} dangerouslySetInnerHTML={{ __html: post.message }} /> </Comment.Text> |