]> Untitled Git - lemmy-ui.git/commitdiff
Fixing mod ban removeData default.
authorDessalines <tyhou13@gmx.com>
Tue, 26 Jan 2021 17:21:10 +0000 (12:21 -0500)
committerDessalines <tyhou13@gmx.com>
Tue, 26 Jan 2021 17:21:10 +0000 (12:21 -0500)
src/shared/components/comment-node.tsx
src/shared/components/post-listing.tsx

index dd6041119c68c2b0be9c358344ecefefc338f663..e86a342823040f4be70a25ec04ff45c9697912ca 100644 (file)
@@ -94,7 +94,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
     showRemoveDialog: false,
     removeReason: null,
     showBanDialog: false,
-    removeData: null,
+    removeData: false,
     banReason: null,
     banExpires: null,
     banType: BanType.Community,
index 8798d0db50cdbdc9bf0ca905e48ef56c34b939c5..b485a0a08ea4a8ec64cf4824cc8b66695f3c8c0f 100644 (file)
@@ -80,7 +80,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
     showRemoveDialog: false,
     removeReason: null,
     showBanDialog: false,
-    removeData: null,
+    removeData: false,
     banReason: null,
     banExpires: null,
     banType: BanType.Community,
@@ -1284,7 +1284,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
     i.setState(i.state);
   }
 
-  handleModRemoveSubmit(i: PostListing) {
+  handleModRemoveSubmit(i: PostListing, event: any) {
     event.preventDefault();
     let form: RemovePost = {
       post_id: i.props.post_view.post.id,
@@ -1350,7 +1350,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
     i.handleModBanBothSubmit(i);
   }
 
-  handleModBanBothSubmit(i: PostListing) {
+  handleModBanBothSubmit(i: PostListing, event?: any) {
     event.preventDefault();
 
     if (i.state.banType == BanType.Community) {