@selfcommunity/react-ui 0.7.9-alpha.23 → 0.7.9-alpha.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,8 +127,6 @@ function GroupSubscribeButton(inProps) {
127
127
  if (!scGroup || (isGroupAdmin && (user === null || user === void 0 ? void 0 : user.id) === scUserContext.user.id) || (isGroupAdmin && !(user === null || user === void 0 ? void 0 : user.id))) {
128
128
  return null;
129
129
  }
130
- return (react_1.default.createElement(Root, Object.assign({ size: "small", variant: "outlined", onClick: handleSubscribeAction, loading: (user && user.group_status === types_1.SCGroupSubscriptionStatusType.REQUESTED) || (!user && scUserContext.user)
131
- ? status === null || scGroupsManager.isLoading(scGroup)
132
- : null, disabled: status === types_1.SCGroupSubscriptionStatusType.REQUESTED, className: (0, classnames_1.default)(classes.root, className) }, rest), isGroupAdmin ? react_1.default.createElement(react_intl_1.FormattedMessage, { defaultMessage: "ui.groupSubscribeButton.accept", id: "ui.groupSubscribeButton.accept" }) : getStatus()));
130
+ return (react_1.default.createElement(Root, Object.assign({ size: "small", variant: "outlined", onClick: handleSubscribeAction, loading: scUserContext.user ? scGroupsManager.isLoading(scGroup) : null, disabled: status === types_1.SCGroupSubscriptionStatusType.REQUESTED, className: (0, classnames_1.default)(classes.root, className) }, rest), isGroupAdmin ? react_1.default.createElement(react_intl_1.FormattedMessage, { defaultMessage: "ui.groupSubscribeButton.accept", id: "ui.groupSubscribeButton.accept" }) : getStatus()));
133
131
  }
134
132
  exports.default = GroupSubscribeButton;
@@ -125,7 +125,5 @@ export default function GroupSubscribeButton(inProps) {
125
125
  if (!scGroup || (isGroupAdmin && (user === null || user === void 0 ? void 0 : user.id) === scUserContext.user.id) || (isGroupAdmin && !(user === null || user === void 0 ? void 0 : user.id))) {
126
126
  return null;
127
127
  }
128
- return (React.createElement(Root, Object.assign({ size: "small", variant: "outlined", onClick: handleSubscribeAction, loading: (user && user.group_status === SCGroupSubscriptionStatusType.REQUESTED) || (!user && scUserContext.user)
129
- ? status === null || scGroupsManager.isLoading(scGroup)
130
- : null, disabled: status === SCGroupSubscriptionStatusType.REQUESTED, className: classNames(classes.root, className) }, rest), isGroupAdmin ? React.createElement(FormattedMessage, { defaultMessage: "ui.groupSubscribeButton.accept", id: "ui.groupSubscribeButton.accept" }) : getStatus()));
128
+ return (React.createElement(Root, Object.assign({ size: "small", variant: "outlined", onClick: handleSubscribeAction, loading: scUserContext.user ? scGroupsManager.isLoading(scGroup) : null, disabled: status === SCGroupSubscriptionStatusType.REQUESTED, className: classNames(classes.root, className) }, rest), isGroupAdmin ? React.createElement(FormattedMessage, { defaultMessage: "ui.groupSubscribeButton.accept", id: "ui.groupSubscribeButton.accept" }) : getStatus()));
131
129
  }