@selfcommunity/react-templates 0.3.50-events.49 → 0.3.50-events.51

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.
@@ -53,13 +53,10 @@ function Event(inProps) {
53
53
  });
54
54
  const { id = 'event', className, event, eventId, widgets, FeedObjectProps, FeedSidebarProps, EventFeedProps = {} } = props;
55
55
  // HOOKS
56
- const { scEvent, setSCEvent } = (0, react_core_1.useSCFetchEvent)({ id: eventId, event });
57
- const handleSubscribe = (group, status) => {
58
- setSCEvent(Object.assign({}, scEvent, { subscription_status: status }));
59
- };
56
+ const { scEvent } = (0, react_core_1.useSCFetchEvent)({ id: eventId, event });
60
57
  if (!scEvent) {
61
58
  return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
62
59
  }
63
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(react_ui_1.EventHeader, { eventId: scEvent.id, EventSubscribeButtonProps: { onSubscribe: handleSubscribe } }), (0, jsx_runtime_1.jsx)(EventFeed_1.default, Object.assign({ className: classes.feed, event: scEvent, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, EventFeedProps))] })));
60
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(react_ui_1.EventHeader, { eventId: scEvent.id }), (0, jsx_runtime_1.jsx)(EventFeed_1.default, Object.assign({ className: classes.feed, event: scEvent, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, EventFeedProps))] })));
64
61
  }
65
62
  exports.default = Event;
@@ -50,12 +50,9 @@ export default function Event(inProps) {
50
50
  });
51
51
  const { id = 'event', className, event, eventId, widgets, FeedObjectProps, FeedSidebarProps, EventFeedProps = {} } = props;
52
52
  // HOOKS
53
- const { scEvent, setSCEvent } = useSCFetchEvent({ id: eventId, event });
54
- const handleSubscribe = (group, status) => {
55
- setSCEvent(Object.assign({}, scEvent, { subscription_status: status }));
56
- };
53
+ const { scEvent } = useSCFetchEvent({ id: eventId, event });
57
54
  if (!scEvent) {
58
55
  return _jsx(EventSkeletonTemplate, {});
59
56
  }
60
- return (_jsxs(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, { children: [_jsx(EventHeader, { eventId: scEvent.id, EventSubscribeButtonProps: { onSubscribe: handleSubscribe } }), _jsx(EventFeed, Object.assign({ className: classes.feed, event: scEvent, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, EventFeedProps))] })));
57
+ return (_jsxs(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, { children: [_jsx(EventHeader, { eventId: scEvent.id }), _jsx(EventFeed, Object.assign({ className: classes.feed, event: scEvent, widgets: widgets, FeedObjectProps: FeedObjectProps, FeedSidebarProps: FeedSidebarProps }, EventFeedProps))] })));
61
58
  }