X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fpost%2Fpost.tsx;h=eeb713a9cef6538bc483776b3cbb0dbf7313b6b5;hb=53c3cfeade90150b07431386745a24aa699a25ec;hp=fe7897ff163a1c2861a037125fcc579f3da4b2c2;hpb=20d54a7e5171bf0632b75605fddd8a4bf874d46a;p=lemmy-ui.git diff --git a/src/shared/components/post/post.tsx b/src/shared/components/post/post.tsx index fe7897f..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,10 +417,10 @@ export class Post extends Component { this.commentsTree()} {this.state.commentViewType == CommentViewType.Flat && this.commentsFlat()} -
-
+ +
+
); } @@ -430,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 ( <> -
+
+ + + +
-
+
+