import React from "react"; import { Image, Icon, Modal, Comment, Flag } from "semantic-ui-react"; import Moment from "react-moment"; import "moment/locale/es"; import { avatars } from "./Quotes"; const ImageModal = ({ href, trigger }) => ( ); const Post = ({ index, post, locked, threadId, currentBoard }) => { if (post.IS_DELETED > 0) { return ( #{currentBoard.board_type === 0 ? post.id : index + 1}
Eliminado por el {post.IS_DELETED === 1 ? "usuario." : "Staff."}
); } const filesize = require("filesize"); const seedrandom = require("seedrandom"); const rng = seedrandom(threadId + index); 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 } } post.message = post.message.replace( ' #{currentBoard.board_type === 0 ? post.id : index + 1}{" "} {currentBoard.dir === "world" ? post.name.split("")[0] : post.name}{" "} {currentBoard.dir === "world" ? : null} {post.tripcode}
{user_id}
{post.file !== "" ? (
} /> {post.file} {post.image_width}x{post.image_height}{" "} {filesize(post.file_size, { bits: true })}
) : null}
{locked ? null : Responder} Reportar ); }; export default Post;