|
@@ -1,4 +1,4 @@
|
|
|
-import React, { Suspense } from 'react';
|
|
|
|
|
|
|
+import React from 'react';
|
|
|
import PropTypes from 'prop-types';
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
import loggerFactory from '@alias/logger';
|
|
import loggerFactory from '@alias/logger';
|
|
@@ -6,6 +6,7 @@ import loggerFactory from '@alias/logger';
|
|
|
import { withUnstatedContainers } from '../../UnstatedUtils';
|
|
import { withUnstatedContainers } from '../../UnstatedUtils';
|
|
|
import { toastError } from '../../../util/apiNotification';
|
|
import { toastError } from '../../../util/apiNotification';
|
|
|
import toArrayIfNot from '../../../../../lib/util/toArrayIfNot';
|
|
import toArrayIfNot from '../../../../../lib/util/toArrayIfNot';
|
|
|
|
|
+import { withLoadingSppiner } from '../../SuspenseUtils';
|
|
|
|
|
|
|
|
import AdminNotificationContainer from '../../../services/AdminNotificationContainer';
|
|
import AdminNotificationContainer from '../../../services/AdminNotificationContainer';
|
|
|
|
|
|
|
@@ -13,20 +14,6 @@ import NotificationSettingContents from './NotificationSettingContents';
|
|
|
|
|
|
|
|
const logger = loggerFactory('growi:NotificationSetting');
|
|
const logger = loggerFactory('growi:NotificationSetting');
|
|
|
|
|
|
|
|
-function NotificationSettingWithContainerWithSuspense(props) {
|
|
|
|
|
- return (
|
|
|
|
|
- <Suspense
|
|
|
|
|
- fallback={(
|
|
|
|
|
- <div className="row">
|
|
|
|
|
- <i className="fa fa-5x fa-spinner fa-pulse mx-auto text-muted"></i>
|
|
|
|
|
- </div>
|
|
|
|
|
- )}
|
|
|
|
|
- >
|
|
|
|
|
- <NotificationSettingWithUnstatedContainer />
|
|
|
|
|
- </Suspense>
|
|
|
|
|
- );
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
let retrieveErrors = null;
|
|
let retrieveErrors = null;
|
|
|
function NotificationSetting(props) {
|
|
function NotificationSetting(props) {
|
|
|
const { adminNotificationContainer } = props;
|
|
const { adminNotificationContainer } = props;
|
|
@@ -52,10 +39,10 @@ function NotificationSetting(props) {
|
|
|
return <NotificationSettingContents />;
|
|
return <NotificationSettingContents />;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const NotificationSettingWithUnstatedContainer = withUnstatedContainers(NotificationSetting, [AdminNotificationContainer]);
|
|
|
|
|
|
|
+const NotificationSettingWithUnstatedContainer = withUnstatedContainers(withLoadingSppiner(NotificationSetting), [AdminNotificationContainer]);
|
|
|
|
|
|
|
|
NotificationSetting.propTypes = {
|
|
NotificationSetting.propTypes = {
|
|
|
adminNotificationContainer: PropTypes.instanceOf(AdminNotificationContainer).isRequired,
|
|
adminNotificationContainer: PropTypes.instanceOf(AdminNotificationContainer).isRequired,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-export default NotificationSettingWithContainerWithSuspense;
|
|
|
|
|
|
|
+export default NotificationSettingWithUnstatedContainer;
|