From cd9b802b71df4e2701e2311b2995fe70a9692ae4 Mon Sep 17 00:00:00 2001 From: Renard Date: Mon, 16 Sep 2019 01:22:56 -0300 Subject: Prettier --- src/Post.js | 159 +++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 103 insertions(+), 56 deletions(-) (limited to 'src/Post.js') diff --git a/src/Post.js b/src/Post.js index 3d08c05..4ccb7d0 100644 --- a/src/Post.js +++ b/src/Post.js @@ -1,69 +1,116 @@ import React from "react"; -import { Segment, Header, Image, Label, Icon, Modal, Comment, Divider } from "semantic-ui-react"; +import { + Segment, + Header, + Image, + Label, + Icon, + Modal, + Comment, + Divider +} 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, dir, threadId }) => { - if (post.IS_DELETED > 0) { - return ( - - - - #{index + 1} - -
-
- - Eliminado por el {post.IS_DELETED === 1 ? "usuario." : "Staff."} - -
-
- ); - } + if (post.IS_DELETED > 0) { + return ( + + + + #{index + 1} + +
+ +
+
+ + + Eliminado por el {post.IS_DELETED === 1 ? "usuario." : "Staff."} + + +
+
+ ); + } - const filesize = require('filesize'); - const seedrandom = require("seedrandom"); - const rng = seedrandom(threadId + index); + 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 user_id = post.timestamp_formatted.split(" ID:")[1]; + const i = Math.round(rng() * avatars.length); + const rndAvatar = avatars[i]; - return ( - - - - #{index + 1} {post.name}{post.tripcode} - -
-
{user_id}
-
- - {post.file !== "" ? -
- } /> - {post.file} {post.image_width}x{post.image_height} {filesize(post.file_size, { bits: true })} -
- : null} -
- - - ResponderReportar - - - - ); -} + return ( + + + + + #{index + 1}{" "} + + {post.name} + + {post.tripcode} + + +
+ +
+
+ + {user_id} +
+
+ + {post.file !== "" ? ( +
+ + } + /> + {post.file} {post.image_width}x{post.image_height}{" "} + {filesize(post.file_size, { bits: true })} +
+ ) : null} +
+ + + Responder + Reportar + + + + ); +}; -export default Post; \ No newline at end of file +export default Post; -- cgit v1.2.1-18-gbd029