Remove redundant parameter
This commit is contained in:
parent
99f3de3098
commit
e60c2d2970
|
@ -1224,12 +1224,11 @@ var ProductCategoryList = withAPIData(function (props) {
|
|||
}
|
||||
|
||||
var AccordionButton = function AccordionButton(_ref3) {
|
||||
var category = _ref3.category,
|
||||
toggled = _ref3.toggled;
|
||||
var category = _ref3.category;
|
||||
|
||||
var icon = 'arrow-down-alt2';
|
||||
|
||||
if (toggled) {
|
||||
if (openAccordion === category) {
|
||||
icon = 'arrow-up-alt2';
|
||||
}
|
||||
|
||||
|
@ -1273,7 +1272,7 @@ var ProductCategoryList = withAPIData(function (props) {
|
|||
{ className: "product-category-count" },
|
||||
category.count
|
||||
),
|
||||
0 === category.parent && wp.element.createElement(AccordionButton, { category: category.id, toggled: openAccordion === category.id })
|
||||
0 === category.parent && wp.element.createElement(AccordionButton, { category: category.id })
|
||||
),
|
||||
wp.element.createElement(CategoryTree, { categories: categories, parent: category.id })
|
||||
);
|
||||
|
|
|
@ -113,10 +113,10 @@ const ProductCategoryList = withAPIData( ( props ) => {
|
|||
return __( 'No categories found' );
|
||||
}
|
||||
|
||||
const AccordionButton = ( { category, toggled } ) => {
|
||||
const AccordionButton = ( { category } ) => {
|
||||
let icon = 'arrow-down-alt2';
|
||||
|
||||
if ( toggled ) {
|
||||
if ( openAccordion === category ) {
|
||||
icon = 'arrow-up-alt2';
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ const ProductCategoryList = withAPIData( ( props ) => {
|
|||
/> { category.name }
|
||||
<span className="product-category-count">{ category.count }</span>
|
||||
{ 0 === category.parent &&
|
||||
<AccordionButton category={ category.id } toggled={ openAccordion === category.id } />
|
||||
<AccordionButton category={ category.id } />
|
||||
}
|
||||
</label>
|
||||
<CategoryTree categories={ categories } parent={ category.id } />
|
||||
|
|
Loading…
Reference in New Issue