From 88f146ce59ad59d89737854465cf0786066dc648 Mon Sep 17 00:00:00 2001 From: Renard Date: Mon, 16 Sep 2019 19:34:39 -0300 Subject: Banderas para world --- src/Post.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/Post.js') 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 ( @@ -59,7 +69,10 @@ const Post = ({ index, post, locked, threadId, currentBoard }) => { - {post.name} + {currentBoard.dir === "world" + ? post.name.split("")[0] + : post.name}{" "} + {currentBoard.dir === "world" ? : null} {post.tripcode} -- cgit v1.2.1-18-gbd029