@selfcommunity/react-templates 0.4.1-alpha.2 → 0.4.1-alpha.21
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.
|
@@ -40,10 +40,17 @@ const WIDGETS = [
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
type: 'widget',
|
|
43
|
-
component: react_ui_1.
|
|
43
|
+
component: react_ui_1.EventMediaWidget,
|
|
44
44
|
componentProps: {},
|
|
45
45
|
column: 'right',
|
|
46
46
|
position: 2
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: 'widget',
|
|
50
|
+
component: react_ui_1.RelatedEventsWidget,
|
|
51
|
+
componentProps: {},
|
|
52
|
+
column: 'right',
|
|
53
|
+
position: 3
|
|
47
54
|
}
|
|
48
55
|
];
|
|
49
56
|
/**
|
|
@@ -111,7 +118,7 @@ function EventFeed(inProps) {
|
|
|
111
118
|
}
|
|
112
119
|
return w;
|
|
113
120
|
}), [widgets, scEvent]);
|
|
114
|
-
if (!scEvent) {
|
|
121
|
+
if (!scEvent || (scEvent && ((eventId !== undefined && scEvent.id !== eventId) || (event && scEvent.id !== event.id)))) {
|
|
115
122
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
116
123
|
}
|
|
117
124
|
else if (scEvent.privacy === types_1.SCEventPrivacyType.PRIVATE &&
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useRef } from 'react';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
|
-
import { ContributionUtils, EventInfoWidget, EventLocationWidget, EventMembersWidget, Feed, FeedObject, FeedObjectSkeleton, InlineComposerWidget, RelatedEventsWidget, SCFeedObjectTemplateType } from '@selfcommunity/react-ui';
|
|
4
|
+
import { ContributionUtils, EventInfoWidget, EventLocationWidget, EventMediaWidget, EventMembersWidget, Feed, FeedObject, FeedObjectSkeleton, InlineComposerWidget, RelatedEventsWidget, SCFeedObjectTemplateType } from '@selfcommunity/react-ui';
|
|
5
5
|
import { Endpoints } from '@selfcommunity/api-services';
|
|
6
6
|
import { Link, SCRoutes, useSCFetchEvent, useSCRouting, useSCUser } from '@selfcommunity/react-core';
|
|
7
7
|
import { SCCustomAdvPosition, SCEventPrivacyType, SCEventSubscriptionStatusType, SCFeedTypologyType } from '@selfcommunity/types';
|
|
@@ -37,10 +37,17 @@ const WIDGETS = [
|
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
type: 'widget',
|
|
40
|
-
component:
|
|
40
|
+
component: EventMediaWidget,
|
|
41
41
|
componentProps: {},
|
|
42
42
|
column: 'right',
|
|
43
43
|
position: 2
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'widget',
|
|
47
|
+
component: RelatedEventsWidget,
|
|
48
|
+
componentProps: {},
|
|
49
|
+
column: 'right',
|
|
50
|
+
position: 3
|
|
44
51
|
}
|
|
45
52
|
];
|
|
46
53
|
/**
|
|
@@ -108,7 +115,7 @@ export default function EventFeed(inProps) {
|
|
|
108
115
|
}
|
|
109
116
|
return w;
|
|
110
117
|
}), [widgets, scEvent]);
|
|
111
|
-
if (!scEvent) {
|
|
118
|
+
if (!scEvent || (scEvent && ((eventId !== undefined && scEvent.id !== eventId) || (event && scEvent.id !== event.id)))) {
|
|
112
119
|
return _jsx(EventFeedSkeleton, {});
|
|
113
120
|
}
|
|
114
121
|
else if (scEvent.privacy === SCEventPrivacyType.PRIVATE &&
|