Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 09f515a

Browse files
committed
Correct case on ComponentId
1 parent 30c02cb commit 09f515a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

assets/js/blocks/product-categories/block.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import classnames from 'classnames';
88
/**
99
* Internal dependencies
1010
*/
11-
import withComponentID from '../../utils/with-component-id';
11+
import withComponentId from '../../utils/with-component-id';
1212

1313
/**
1414
* Component displaying the categories as dropdown or list.
@@ -70,7 +70,7 @@ class ProductCategoriesBlock extends Component {
7070
}
7171

7272
render() {
73-
const { attributes, categories, componentID } = this.props;
73+
const { attributes, categories, ComponentId } = this.props;
7474
const { className, isDropdown } = attributes;
7575
const classes = classnames(
7676
'wc-block-product-categories',
@@ -81,7 +81,7 @@ class ProductCategoriesBlock extends Component {
8181
}
8282
);
8383

84-
const selectId = `prod-categories-${ componentID }`;
84+
const selectId = `prod-categories-${ ComponentId }`;
8585

8686
return (
8787
<Fragment>
@@ -122,4 +122,4 @@ class ProductCategoriesBlock extends Component {
122122
}
123123
}
124124

125-
export default withComponentID( ProductCategoriesBlock );
125+
export default withComponentId( ProductCategoriesBlock );

assets/js/utils/with-component-id.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const ids = [];
77
*
88
* This is an alternative for withInstanceId from @wordpress/compose to avoid using that dependency on the frontend.
99
*/
10-
const withComponentID = ( OriginalComponent ) => {
10+
const withComponentId = ( OriginalComponent ) => {
1111
return class WrappedComponent extends Component {
1212
generateUniqueID() {
1313
const group = WrappedComponent.name;
@@ -22,14 +22,14 @@ const withComponentID = ( OriginalComponent ) => {
2222
}
2323

2424
render() {
25-
const componentID = this.generateUniqueID();
25+
const ComponentId = this.generateUniqueID();
2626

2727
return <OriginalComponent
2828
{ ...this.props }
29-
componentID={ componentID }
29+
ComponentId={ ComponentId }
3030
/>;
3131
}
3232
};
3333
};
3434

35-
export default withComponentID;
35+
export default withComponentId;

0 commit comments

Comments
 (0)