X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fpost%2Fpost.tsx;h=eeb713a9cef6538bc483776b3cbb0dbf7313b6b5;hb=53c3cfeade90150b07431386745a24aa699a25ec;hp=f0aa3ff5bfc60b5a6bd40cdcff11cf0b551bc1da;hpb=dfe394adca9da70664e52556712459c33356c4ae;p=lemmy-ui.git diff --git a/src/shared/components/post/post.tsx b/src/shared/components/post/post.tsx index f0aa3ff..eeb713a 100644 --- a/src/shared/components/post/post.tsx +++ b/src/shared/components/post/post.tsx @@ -19,10 +19,11 @@ import { restoreScrollPosition, saveScrollPosition, } from "@utils/browser"; -import { debounce } from "@utils/helpers"; +import { debounce, randomStr } from "@utils/helpers"; import { isImage } from "@utils/media"; import { RouteDataResponse } from "@utils/types"; import autosize from "autosize"; +import classNames from "classnames"; import { Component, RefObject, createRef, linkEvent } from "inferno"; import { AddAdmin, @@ -348,10 +349,11 @@ export class Post extends Component { const res = this.state.postRes.data; return (
-
+
@@ -415,8 +417,10 @@ export class Post extends Component { this.commentsTree()} {this.state.commentViewType == CommentViewType.Flat && this.commentsFlat()} -
-
{this.sidebar()}
+ +
); } @@ -428,80 +432,98 @@ export class Post extends Component { } sortRadios() { + const radioId = + this.state.postRes.state === "success" + ? this.state.postRes.data.post_view.post.id + : randomStr(); + return ( <> -
+
+ + + +
-
+
+