Skip to content

Commit

Permalink
Jetpack settings page: Removing defaultProps from SearchableModules c…
Browse files Browse the repository at this point in the history
…omponent (#38546)
  • Loading branch information
coder-karen authored Jul 26, 2024
1 parent 04a2033 commit 4ab6cdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { withModuleSettingsFormHelpers } from 'components/module-settings/with-m
import SettingsCard from 'components/settings-card';
import SettingsGroup from 'components/settings-group';
import { includes, forEach } from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import {
Expand All @@ -30,7 +29,7 @@ export const SearchableModules = withModuleSettingsFormHelpers(
}

// Only render if search terms present
const searchTerms = this.props.searchTerm;
const searchTerms = this.props.searchTerm || '';
if ( searchTerms.length < 3 ) {
return null;
}
Expand Down Expand Up @@ -84,14 +83,6 @@ export const SearchableModules = withModuleSettingsFormHelpers(
}
);

SearchableModules.propTypes = {
searchTerm: PropTypes.string,
};

SearchableModules.defaultProps = {
searchTerm: '',
};

class ActiveCard extends Component {
render() {
const m = this.props.moduleData,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Admin page: Remove propTypes and defaultProps from code due to React legacy code warnings.

0 comments on commit 4ab6cdb

Please sign in to comment.