From: Dessalines Date: Tue, 26 Jan 2021 17:21:10 +0000 (-0500) Subject: Fixing mod ban removeData default. X-Git-Url: http://these/git/%22%7Burl%7D/%22https:/image.com/%7BfrontRss%7D?a=commitdiff_plain;h=ac3b9e68f3b90327a0cf8c1fa52c7d267299f3ea;p=lemmy-ui.git Fixing mod ban removeData default. --- diff --git a/src/shared/components/comment-node.tsx b/src/shared/components/comment-node.tsx index dd60411..e86a342 100644 --- a/src/shared/components/comment-node.tsx +++ b/src/shared/components/comment-node.tsx @@ -94,7 +94,7 @@ export class CommentNode extends Component { showRemoveDialog: false, removeReason: null, showBanDialog: false, - removeData: null, + removeData: false, banReason: null, banExpires: null, banType: BanType.Community, diff --git a/src/shared/components/post-listing.tsx b/src/shared/components/post-listing.tsx index 8798d0d..b485a0a 100644 --- a/src/shared/components/post-listing.tsx +++ b/src/shared/components/post-listing.tsx @@ -80,7 +80,7 @@ export class PostListing extends Component { 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 { 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 { i.handleModBanBothSubmit(i); } - handleModBanBothSubmit(i: PostListing) { + handleModBanBothSubmit(i: PostListing, event?: any) { event.preventDefault(); if (i.state.banType == BanType.Community) {