Browse Source

switch isSubscribing status

kaori 4 năm trước cách đây
mục cha
commit
14c60195fc
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      packages/app/src/components/SubscribeButton.tsx

+ 5 - 1
packages/app/src/components/SubscribeButton.tsx

@@ -56,7 +56,11 @@ const SubscribeButton: FC<Props> = (props: Props) => {
     return <></>;
   }
 
-  const isSubscribing = subscriptionData.status === SubscribeStatuses.STATUS_SUBSCRIBE;
+  let isSubscribing;
+
+  if (subscriptionData.status) {
+    isSubscribing = true;
+  }
 
   const buttonClass = `${isSubscribing ? 'active' : ''} ${appContainer.isGuestUser ? 'disabled' : ''}`;
   const iconClass = isSubscribing || isSubscribing == null ? 'fa fa-eye' : 'fa fa-eye-slash';