itizawa 6 năm trước cách đây
mục cha
commit
4200d449a4
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/client/js/components/LikeButton.jsx

+ 1 - 1
src/client/js/components/LikeButton.jsx

@@ -19,7 +19,7 @@ class LikeButton extends React.Component {
 
   async handleClick() {
     const { appContainer, pageId } = this.props;
-    const bool = this.state.isLiked;
+    const bool = !this.state.isLiked;
     try {
       await appContainer.apiv3.put('/page/likes', { pageId, bool });
       this.setState({ isLiked: bool });