Browse Source

fix(js): Add super calls for AsyncComponent.componentDidMount (#50028)

Evan Purkhiser 1 year ago
parent
commit
f208cf9238

+ 3 - 0
static/app/components/asyncComponent.tsx

@@ -91,6 +91,9 @@ class AsyncComponent<
     }
   }
 
+  // TODO(epurkhiser): Move UNSAFE_componentWillMount into here
+  componentDidMount() {}
+
   componentDidUpdate(prevProps: P, prevContext: any) {
     const isRouterInContext = !!prevContext.router;
     const isLocationInProps = prevProps.location !== undefined;

+ 1 - 0
static/app/components/modals/inviteMembersModal/index.tsx

@@ -60,6 +60,7 @@ class InviteMembersModal extends AsyncComponent<Props, State> {
   sessionId = '';
 
   componentDidMount() {
+    super.componentDidMount();
     this.sessionId = uniqueId();
 
     const {organization, source} = this.props;

+ 1 - 0
static/app/components/modals/sentryAppDetailsModal.tsx

@@ -41,6 +41,7 @@ export default class SentryAppDetailsModal extends AsyncComponent<Props, State>
   }
 
   componentDidMount() {
+    super.componentDidMount();
     this.trackOpened();
   }
 

+ 1 - 0
static/app/views/alerts/rules/metric/ruleForm.tsx

@@ -133,6 +133,7 @@ class RuleFormContainer extends AsyncComponent<Props, State> {
   }
 
   componentDidMount() {
+    super.componentDidMount();
     const {organization} = this.props;
     const {project} = this.state;
     // SearchBar gets its tags from Reflux.

+ 1 - 0
static/app/views/projectDetail/charts/projectErrorsBasicChart.tsx

@@ -55,6 +55,7 @@ class ProjectErrorsBasicChart extends AsyncComponent<Props, State> {
   }
 
   componentDidMount() {
+    super.componentDidMount();
     const {location} = this.props;
     if (!ERRORS_BASIC_CHART_PERIODS.includes(location.query.statsPeriod)) {
       browserHistory.replace({

+ 1 - 0
static/app/views/projectDetail/projectDetail.tsx

@@ -63,6 +63,7 @@ class ProjectDetail extends AsyncView<Props, State> {
   }
 
   componentDidMount() {
+    super.componentDidMount();
     this.syncProjectWithSlug();
   }
 

+ 1 - 0
static/app/views/projectInstall/platformIntegrationSetup.tsx

@@ -43,6 +43,7 @@ class PlatformIntegrationSetup extends AsyncComponent<Props, State> {
   }
 
   componentDidMount() {
+    super.componentDidMount();
     window.scrollTo(0, 0);
 
     const {platform} = this.props.params;

+ 1 - 0
static/app/views/releases/detail/index.tsx

@@ -259,6 +259,7 @@ class ReleasesDetailContainer extends AsyncComponent<
   }
 
   componentDidMount() {
+    super.componentDidMount();
     this.removeGlobalDateTimeFromUrl();
     this.props.setRouteAnalyticsParams({release: this.props.params.release});
   }

+ 1 - 0
static/app/views/settings/account/accountSecurity/accountSecurityEnroll.tsx

@@ -189,6 +189,7 @@ class AccountSecurityEnroll extends AsyncView<Props, State> {
   }
 
   componentDidMount() {
+    super.componentDidMount();
     this.pendingInvitation = getPendingInvite();
   }
 

+ 1 - 0
static/app/views/settings/account/notifications/notificationSettings.tsx

@@ -60,6 +60,7 @@ class NotificationSettings extends AsyncComponent<Props, State> {
   }
 
   componentDidMount() {
+    super.componentDidMount();
     // only tied to a user
     trackAnalytics('notification_settings.index_page_viewed', {
       organization: null,

Some files were not shown because too many files changed in this diff