@selfcommunity/react-ui 0.7.9-alpha.28 → 0.7.9-alpha.29
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.
|
@@ -11,6 +11,7 @@ const constants_1 = require("./constants");
|
|
|
11
11
|
const react_intl_1 = require("react-intl");
|
|
12
12
|
const types_1 = require("@selfcommunity/types");
|
|
13
13
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
14
|
+
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
14
15
|
const classes = {
|
|
15
16
|
root: `${constants_1.PREFIX}-root`,
|
|
16
17
|
title: `${constants_1.PREFIX}-title`,
|
|
@@ -64,6 +65,9 @@ function GroupInfoWidget(inProps) {
|
|
|
64
65
|
const { scGroup } = (0, react_core_1.useSCFetchGroup)({ id: groupId, group });
|
|
65
66
|
// INTL
|
|
66
67
|
const intl = (0, react_intl_1.useIntl)();
|
|
68
|
+
if (!scGroup) {
|
|
69
|
+
return react_1.default.createElement(Skeleton_1.default, null);
|
|
70
|
+
}
|
|
67
71
|
/**
|
|
68
72
|
* Renders root object
|
|
69
73
|
*/
|
|
@@ -9,6 +9,7 @@ import { PREFIX } from './constants';
|
|
|
9
9
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
10
10
|
import { SCGroupPrivacyType } from '@selfcommunity/types';
|
|
11
11
|
import { useSCFetchGroup } from '@selfcommunity/react-core';
|
|
12
|
+
import GroupInfoWidgetSkeleton from './Skeleton';
|
|
12
13
|
const classes = {
|
|
13
14
|
root: `${PREFIX}-root`,
|
|
14
15
|
title: `${PREFIX}-title`,
|
|
@@ -62,6 +63,9 @@ export default function GroupInfoWidget(inProps) {
|
|
|
62
63
|
const { scGroup } = useSCFetchGroup({ id: groupId, group });
|
|
63
64
|
// INTL
|
|
64
65
|
const intl = useIntl();
|
|
66
|
+
if (!scGroup) {
|
|
67
|
+
return React.createElement(GroupInfoWidgetSkeleton, null);
|
|
68
|
+
}
|
|
65
69
|
/**
|
|
66
70
|
* Renders root object
|
|
67
71
|
*/
|