]> Untitled Git - lemmy-ui.git/blobdiff - src/shared/components/comment/comment-node.tsx
Changing all bigints to numbers
[lemmy-ui.git] / src / shared / components / comment / comment-node.tsx
index 2b7ea6ee115d52162c7fb569de93534f8d2c2dd8..d68c5b30695a29bd8ab1c337b2a3eab3d45461c4 100644 (file)
@@ -84,9 +84,9 @@ interface CommentNodeState {
   showReportDialog: boolean;
   reportReason?: string;
   my_vote?: number;
-  score: bigint;
-  upvotes: bigint;
-  downvotes: bigint;
+  score: number;
+  upvotes: number;
+  downvotes: number;
   readLoading: boolean;
   saveLoading: boolean;
 }
@@ -259,11 +259,6 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                   {i18n.t("bot_account").toLowerCase()}
                 </div>
               )}
-              {(cv.creator_banned_from_community || isBanned(cv.creator)) && (
-                <div className="badge badge-danger mr-2">
-                  {i18n.t("banned")}
-                </div>
-              )}
               {this.props.showCommunity && (
                 <>
                   <span className="mx-1">{i18n.t("to")}</span>
@@ -838,9 +833,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
             >
               {i18n.t("x_more_replies", {
                 count: node.comment_view.counts.child_count,
-                formattedCount: numToSI(
-                  BigInt(node.comment_view.counts.child_count)
-                ),
+                formattedCount: numToSI(node.comment_view.counts.child_count),
               })}{" "}
               ➔
             </button>
@@ -1157,19 +1150,19 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
 
     if (myVote == 1) {
       this.setState({
-        score: this.state.score - 1n,
-        upvotes: this.state.upvotes - 1n,
+        score: this.state.score - 1,
+        upvotes: this.state.upvotes - 1,
       });
     } else if (myVote == -1) {
       this.setState({
-        downvotes: this.state.downvotes - 1n,
-        upvotes: this.state.upvotes + 1n,
-        score: this.state.score + 2n,
+        downvotes: this.state.downvotes - 1,
+        upvotes: this.state.upvotes + 1,
+        score: this.state.score + 2,
       });
     } else {
       this.setState({
-        score: this.state.score + 1n,
-        upvotes: this.state.upvotes + 1n,
+        score: this.state.score + 1,
+        upvotes: this.state.upvotes + 1,
       });
     }
 
@@ -1194,19 +1187,19 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
 
     if (myVote == 1) {
       this.setState({
-        downvotes: this.state.downvotes + 1n,
-        upvotes: this.state.upvotes - 1n,
-        score: this.state.score - 2n,
+        downvotes: this.state.downvotes + 1,
+        upvotes: this.state.upvotes - 1,
+        score: this.state.score - 2,
       });
     } else if (myVote == -1) {
       this.setState({
-        downvotes: this.state.downvotes - 1n,
-        score: this.state.score + 1n,
+        downvotes: this.state.downvotes - 1,
+        score: this.state.score + 1,
       });
     } else {
       this.setState({
-        downvotes: this.state.downvotes + 1n,
-        score: this.state.score - 1n,
+        downvotes: this.state.downvotes + 1,
+        score: this.state.score - 1,
       });
     }
 
@@ -1547,7 +1540,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
       post_id: i.props.node.comment_view.post.id,
       parent_id: i.props.node.comment_view.comment.id,
       max_depth: commentTreeMaxDepth,
-      limit: 999n, // TODO
+      limit: 999, // TODO
       type_: "All",
       saved_only: false,
       auth: myAuth(false),