auth: myAuthRequired(),
});
}
-
- i.setState({ upvoteLoading: false });
};
const handleDownvote = (i: VoteButtons) => {
auth: myAuthRequired(),
});
}
- i.setState({ downvoteLoading: false });
};
export class VoteButtonsCompact extends Component<
super(props, context);
}
+ componentWillReceiveProps(nextProps: VoteButtonsProps) {
+ if (this.props !== nextProps) {
+ this.setState({
+ upvoteLoading: false,
+ downvoteLoading: false,
+ });
+ }
+ }
+
render() {
return (
<>
super(props, context);
}
+ componentWillReceiveProps(nextProps: VoteButtonsProps) {
+ if (this.props !== nextProps) {
+ this.setState({
+ upvoteLoading: false,
+ downvoteLoading: false,
+ });
+ }
+ }
+
render() {
return (
<div className="vote-bar small text-center">