Browse Source

add checked

takeru0001 5 năm trước cách đây
mục cha
commit
59e51fc948
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      src/client/js/components/LikeButton.jsx

+ 6 - 0
src/client/js/components/LikeButton.jsx

@@ -19,6 +19,12 @@ class LikeButton extends React.Component {
 
   async handleClick() {
     const { pageContainer } = this.props;
+    const isGuestUser = pageContainer.state.isGuestUser;
+
+    if (isGuestUser) {
+      return;
+    }
+
     try {
       pageContainer.toggleLike();
     }