@selfcommunity/react-ui 0.10.4-alpha.3 → 0.10.4-alpha.5
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.
- package/lib/cjs/components/EventParticipantsButton/EventParticipantsButton.js +1 -1
- package/lib/cjs/shared/EventInfoDetails/index.js +1 -1
- package/lib/esm/components/EventParticipantsButton/EventParticipantsButton.js +1 -1
- package/lib/esm/shared/EventInfoDetails/index.js +1 -1
- package/lib/umd/react-ui.js +1 -1
- package/package.json +2 -2
|
@@ -73,7 +73,7 @@ function EventParticipantsButton(inProps) {
|
|
|
73
73
|
const [followers, setFollowers] = (0, react_1.useState)([]);
|
|
74
74
|
const [open, setOpen] = (0, react_1.useState)(false);
|
|
75
75
|
// HOOKS
|
|
76
|
-
const { scEvent } = (0, react_core_1.useSCFetchEvent)({ id: eventId, event });
|
|
76
|
+
const { scEvent } = (0, react_core_1.useSCFetchEvent)({ id: eventId, event, autoSubscribe: false });
|
|
77
77
|
const participantsAvailable = (0, react_1.useMemo)(() => (scEvent === null || scEvent === void 0 ? void 0 : scEvent.privacy) === types_1.SCEventPrivacyType.PUBLIC ||
|
|
78
78
|
[types_1.SCEventSubscriptionStatusType.SUBSCRIBED, types_1.SCEventSubscriptionStatusType.GOING, types_1.SCEventSubscriptionStatusType.NOT_GOING].indexOf(scEvent === null || scEvent === void 0 ? void 0 : scEvent.subscription_status) > -1, [scEvent]);
|
|
79
79
|
(0, use_deep_compare_effect_1.useDeepCompareEffectNoCheck)(() => {
|
|
@@ -29,7 +29,7 @@ function EventInfoDetails(inProps) {
|
|
|
29
29
|
const { event, eventId, hideDateIcon = false, hideRecurringIcon = false, hidePrivacyIcon = false, hideLocationIcon = false, hideCreatedIcon = false, hasDateInfo = true, hasRecurringInfo = false, hasPrivacyInfo = true, hasLocationInfo = true, hasCreatedInfo = false, hasInProgress = false, beforeDateInfo, beforeRecurringInfo, beforePrivacyInfo, beforeLocationInfo, beforeCreatedInfo } = props;
|
|
30
30
|
// HOOKS
|
|
31
31
|
const intl = (0, react_intl_1.useIntl)();
|
|
32
|
-
const { scEvent } = (0, react_core_1.useSCFetchEvent)({ id: eventId, event });
|
|
32
|
+
const { scEvent } = (0, react_core_1.useSCFetchEvent)({ id: eventId, event, autoSubscribe: false });
|
|
33
33
|
const privacy = (0, react_1.useMemo)(() => (scEvent && scEvent.privacy === types_1.SCEventPrivacyType.PUBLIC ? 'ui.eventInfoDetails.privacy.public' : 'ui.eventInfoDetails.privacy.private'), [scEvent]);
|
|
34
34
|
const location = (0, react_1.useMemo)(() => scEvent && scEvent.location === types_1.SCEventLocationType.ONLINE ? 'ui.eventInfoDetails.location.virtual' : 'ui.eventInfoDetails.location.inPerson', [scEvent]);
|
|
35
35
|
if (!scEvent) {
|
|
@@ -71,7 +71,7 @@ export default function EventParticipantsButton(inProps) {
|
|
|
71
71
|
const [followers, setFollowers] = useState([]);
|
|
72
72
|
const [open, setOpen] = useState(false);
|
|
73
73
|
// HOOKS
|
|
74
|
-
const { scEvent } = useSCFetchEvent({ id: eventId, event });
|
|
74
|
+
const { scEvent } = useSCFetchEvent({ id: eventId, event, autoSubscribe: false });
|
|
75
75
|
const participantsAvailable = useMemo(() => (scEvent === null || scEvent === void 0 ? void 0 : scEvent.privacy) === SCEventPrivacyType.PUBLIC ||
|
|
76
76
|
[SCEventSubscriptionStatusType.SUBSCRIBED, SCEventSubscriptionStatusType.GOING, SCEventSubscriptionStatusType.NOT_GOING].indexOf(scEvent === null || scEvent === void 0 ? void 0 : scEvent.subscription_status) > -1, [scEvent]);
|
|
77
77
|
useDeepCompareEffectNoCheck(() => {
|
|
@@ -27,7 +27,7 @@ export default function EventInfoDetails(inProps) {
|
|
|
27
27
|
const { event, eventId, hideDateIcon = false, hideRecurringIcon = false, hidePrivacyIcon = false, hideLocationIcon = false, hideCreatedIcon = false, hasDateInfo = true, hasRecurringInfo = false, hasPrivacyInfo = true, hasLocationInfo = true, hasCreatedInfo = false, hasInProgress = false, beforeDateInfo, beforeRecurringInfo, beforePrivacyInfo, beforeLocationInfo, beforeCreatedInfo } = props;
|
|
28
28
|
// HOOKS
|
|
29
29
|
const intl = useIntl();
|
|
30
|
-
const { scEvent } = useSCFetchEvent({ id: eventId, event });
|
|
30
|
+
const { scEvent } = useSCFetchEvent({ id: eventId, event, autoSubscribe: false });
|
|
31
31
|
const privacy = useMemo(() => (scEvent && scEvent.privacy === SCEventPrivacyType.PUBLIC ? 'ui.eventInfoDetails.privacy.public' : 'ui.eventInfoDetails.privacy.private'), [scEvent]);
|
|
32
32
|
const location = useMemo(() => scEvent && scEvent.location === SCEventLocationType.ONLINE ? 'ui.eventInfoDetails.location.virtual' : 'ui.eventInfoDetails.location.inPerson', [scEvent]);
|
|
33
33
|
if (!scEvent) {
|