yusuketk 5 лет назад
Родитель
Сommit
082cd4743e

+ 14 - 0
src/client/js/components/Admin/App/AppSettingsPage.jsx

@@ -19,11 +19,21 @@ const logger = loggerFactory('growi:appSettings');
 
 class AppSettingsPage extends React.Component {
 
+  constructor(props) {
+    super(props);
+
+    this.state = {
+      isRetrieving: true,
+    };
+
+  }
+
   async componentDidMount() {
     const { adminAppContainer } = this.props;
 
     try {
       await adminAppContainer.retrieveAppSettingsData();
+      this.setState({ isRetrieving: false });
     }
     catch (err) {
       toastError(err);
@@ -33,6 +43,10 @@ class AppSettingsPage extends React.Component {
   }
 
   render() {
+    if (this.state.isRetrieving) {
+      return null;
+    }
+
     const { t } = this.props;
 
     return (

+ 14 - 0
src/client/js/components/Admin/MarkdownSetting/MarkDownSetting.jsx

@@ -18,11 +18,21 @@ const logger = loggerFactory('growi:MarkDown');
 
 class MarkdownSetting extends React.Component {
 
+  constructor(props) {
+    super(props);
+
+    this.state = {
+      isRetrieving: true,
+    };
+
+  }
+
   async componentDidMount() {
     const { adminMarkDownContainer } = this.props;
 
     try {
       await adminMarkDownContainer.retrieveMarkdownData();
+      this.setState({ isRetrieving: false });
     }
     catch (err) {
       toastError(err);
@@ -33,6 +43,10 @@ class MarkdownSetting extends React.Component {
   }
 
   render() {
+    if (this.state.isRetrieving) {
+      return null;
+    }
+
     const { t } = this.props;
 
     return (

+ 6 - 0
src/client/js/components/Admin/Notification/NotificationSetting.jsx

@@ -25,6 +25,7 @@ class NotificationSetting extends React.Component {
     super();
 
     this.state = {
+      isRetrieving: true,
       activeTab: 'slack-configuration',
       // Prevent unnecessary rendering
       activeComponents: new Set(['slack-configuration']),
@@ -38,6 +39,7 @@ class NotificationSetting extends React.Component {
 
     try {
       await adminNotificationContainer.retrieveNotificationData();
+      this.setState({ isRetrieving: false });
     }
     catch (err) {
       toastError(err);
@@ -54,6 +56,10 @@ class NotificationSetting extends React.Component {
   }
 
   render() {
+    if (this.state.isRetrieving) {
+      return null;
+    }
+
     const { activeTab, activeComponents } = this.state;
 
     return (