aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Renard 2019-09-16 19:34:39 -0300
committerLibravatar Renard 2019-09-16 19:34:39 -0300
commit88f146ce59ad59d89737854465cf0786066dc648 (patch)
tree9833e9c5df43fd5d5486a1ace55d9a2c462da5e0
parent76e055ab6aad9cbc314b17eeff566e1465490294 (diff)
downloadbai-client-88f146ce59ad59d89737854465cf0786066dc648.tar.gz
bai-client-88f146ce59ad59d89737854465cf0786066dc648.tar.xz
bai-client-88f146ce59ad59d89737854465cf0786066dc648.zip
Banderas para world
-rw-r--r--src/Post.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/Post.js b/src/Post.js
index 73ae6c0..3963a4d 100644
--- a/src/Post.js
+++ b/src/Post.js
@@ -1,5 +1,5 @@
import React from "react";
-import { Image, Icon, Modal, Comment } from "semantic-ui-react";
+import { Image, Icon, Modal, Comment, Flag } from "semantic-ui-react";
import Moment from "react-moment";
import "moment/locale/es";
import { avatars } from "./Quotes";
@@ -47,6 +47,16 @@ const Post = ({ index, post, locked, threadId, currentBoard }) => {
let user_id = post.timestamp_formatted.split(" ID:")[1];
const i = Math.round(rng() * avatars.length);
const rndAvatar = avatars[i];
+ let flag;
+
+ if (currentBoard.dir === "world") {
+ flag = post.name.match("[A-Z][A-Z]");
+ if (flag !== null) {
+ flag = flag[0].toLowerCase();
+ } else {
+ flag = "kp"; // heh
+ }
+ }
return (
<Comment>
@@ -59,7 +69,10 @@ const Post = ({ index, post, locked, threadId, currentBoard }) => {
<span
className={post.email === "sage" ? "username sage" : "username"}
>
- {post.name}
+ {currentBoard.dir === "world"
+ ? post.name.split("<em>")[0]
+ : post.name}{" "}
+ {currentBoard.dir === "world" ? <Flag name={flag} /> : null}
</span>
<span className="tripcode">{post.tripcode}</span>
</Comment.Author>