aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLibravatar Renard 2019-09-12 16:27:15 -0300
committerLibravatar Renard 2019-09-12 16:27:15 -0300
commit04eb1ecac5e6c817a45f23a3f7d55d48c40f0d0f (patch)
tree6b1d88f8b3133b12f8f7003a2d6cc4bad42e7a3d /src
parent87f100049cb00ab809396addf7e1f868ea3fea02 (diff)
downloadbai-client-04eb1ecac5e6c817a45f23a3f7d55d48c40f0d0f.tar.gz
bai-client-04eb1ecac5e6c817a45f23a3f7d55d48c40f0d0f.tar.xz
bai-client-04eb1ecac5e6c817a45f23a3f7d55d48c40f0d0f.zip
Board.js replies format
Diffstat (limited to 'src')
-rw-r--r--src/Board.js17
-rw-r--r--src/Post.js4
2 files changed, 10 insertions, 11 deletions
diff --git a/src/Board.js b/src/Board.js
index 5a4e620..beb8a74 100644
--- a/src/Board.js
+++ b/src/Board.js
@@ -3,6 +3,7 @@ import { Loader, Message, Segment, Header, Icon, Image } from "semantic-ui-react
import { Link } from "@reach/router";
import Moment from "react-moment";
import "moment/locale/es";
+import Post from "./Post";
class Board extends Component {
constructor() {
super();
@@ -78,15 +79,13 @@ class Board extends Component {
<Segment attached>
<div dangerouslySetInnerHTML={{ __html: thread.message }} />
</Segment>
- {thread.replies.map(reply =>
- <Segment.Group horizontal key={reply.id}>
- {reply.file != "" ? <Segment compact> <Image src={`https://bienvenidoainternet.org/${this.props.dir}/thumb/${reply.thumb}`} /></Segment> : null}
- <Segment>
- <div className="postMessage" dangerouslySetInnerHTML={{ __html: reply.message }} />
- <Icon name="reply" />Responder
- <Icon name="exclamation circle" />Reportar
- </Segment>
- </Segment.Group>
+ {thread.replies.map((reply, index, replies) =>
+ <Header attached key={index} as="h5">
+ #{thread.total_replies - replies.length + index + 1} {reply.name}
+ <Header.Subheader>
+ <div className={`postMessage ${this.props.dir === "zonavip" ? "vipFont" : null}`} dangerouslySetInnerHTML={{ __html: reply.message }} />
+ </Header.Subheader>
+ </Header>
)}
</Segment.Group>
diff --git a/src/Post.js b/src/Post.js
index 99eadb5..956cf72 100644
--- a/src/Post.js
+++ b/src/Post.js
@@ -16,12 +16,12 @@ const Post = ({ index, post, locked, dir }) => {
<Segment.Group horizontal>
{post.file != "" ?
- <Segment padded compact className="imageSegment">
+ <Segment compact className="imageSegment">
<Label attached='bottom'>{post.file} {post.image_width}x{post.image_height} {filesize(post.file_size, { bits: true })}</Label>
<Image fluid src={`https://bienvenidoainternet.org/${dir}/thumb/${post.thumb}`} />
</Segment> : null}
- <Segment padded>
+ <Segment>
<div className={`postMessage ${dir === "zonavip" ? "vipFont" : null}`} dangerouslySetInnerHTML={{ __html: post.message }} />
{locked ? null :