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