Fixing mod ban removeData default.

This commit is contained in:
Dessalines 2021-01-26 12:21:10 -05:00
parent 4aef29c186
commit ac3b9e68f3
2 changed files with 4 additions and 4 deletions

View file

@ -94,7 +94,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
showRemoveDialog: false, showRemoveDialog: false,
removeReason: null, removeReason: null,
showBanDialog: false, showBanDialog: false,
removeData: null, removeData: false,
banReason: null, banReason: null,
banExpires: null, banExpires: null,
banType: BanType.Community, banType: BanType.Community,

View file

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