Browse Source

ref(js): Remove unnecessary async on lifecycle methods (#35300)

Evan Purkhiser 2 years ago
parent
commit
61ca9d3be1

+ 1 - 1
static/app/components/u2f/u2finterface.tsx

@@ -54,7 +54,7 @@ class U2fInterface extends Component<Props, State> {
     failCount: 0,
   };
 
-  async componentDidMount() {
+  componentDidMount() {
     const supported = !!window.PublicKeyCredential;
 
     // eslint-disable-next-line react/no-did-mount-set-state

+ 2 - 2
static/app/views/dashboardsV2/dashboard.tsx

@@ -139,7 +139,7 @@ class Dashboard extends Component<Props, State> {
     return null;
   }
 
-  async componentDidMount() {
+  componentDidMount() {
     const {organization, newWidget} = this.props;
     if (organization.features.includes('dashboard-grid-layout')) {
       window.addEventListener('resize', this.debouncedHandleResize);
@@ -156,7 +156,7 @@ class Dashboard extends Component<Props, State> {
     this.fetchMemberList();
   }
 
-  async componentDidUpdate(prevProps: Props) {
+  componentDidUpdate(prevProps: Props) {
     const {selection, newWidget} = this.props;
 
     if (newWidget && newWidget !== prevProps.newWidget) {