this.setState(this.state);
}
- handleCommentUpvote(i: CommentNodeI) {
+ handleCommentUpvote(i: CommentNodeI, event: any) {
+ event.preventDefault();
let new_vote = this.state.my_vote == 1 ? 0 : 1;
if (this.state.my_vote == 1) {
setupTippy();
}
- handleCommentDownvote(i: CommentNodeI) {
+ handleCommentDownvote(i: CommentNodeI, event: any) {
+ event.preventDefault();
let new_vote = this.state.my_vote == -1 ? 0 : -1;
if (this.state.my_vote == 1) {
);
}
- handlePostLike(i: PostListing) {
+ handlePostLike(i: PostListing, event: any) {
+ event.preventDefault();
if (!UserService.Instance.user) {
this.context.router.history.push(`/login`);
}
setupTippy();
}
- handlePostDisLike(i: PostListing) {
+ handlePostDisLike(i: PostListing, event: any) {
+ event.preventDefault();
if (!UserService.Instance.user) {
this.context.router.history.push(`/login`);
}