diff options
author | Renard | 2019-09-16 19:34:39 -0300 |
---|---|---|
committer | Renard | 2019-09-16 19:34:39 -0300 |
commit | 88f146ce59ad59d89737854465cf0786066dc648 (patch) | |
tree | 9833e9c5df43fd5d5486a1ace55d9a2c462da5e0 /src | |
parent | 76e055ab6aad9cbc314b17eeff566e1465490294 (diff) | |
download | bai-client-88f146ce59ad59d89737854465cf0786066dc648.tar.gz bai-client-88f146ce59ad59d89737854465cf0786066dc648.tar.xz bai-client-88f146ce59ad59d89737854465cf0786066dc648.zip |
Banderas para world
Diffstat (limited to 'src')
-rw-r--r-- | src/Post.js | 17 |
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> |