mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Removed products options from members segment select
no issue - we're currently limited to a single product so it doesn't make sense to show it as an option as it creates two different routes to "paid members" that we'd like to avoid for now
This commit is contained in:
parent
51536fb2ef
commit
27a2bc7722
1 changed files with 0 additions and 22 deletions
|
@ -90,28 +90,6 @@ export default class GhMembersSegmentSelect extends Component {
|
|||
options.push(labelsGroup);
|
||||
}
|
||||
|
||||
// fetch all products w̶i̶t̶h̶ c̶o̶u̶n̶t̶s̶
|
||||
// TODO: add `include: 'count.members` to query once API supports
|
||||
const products = yield this.store.query('product', {limit: 'all'});
|
||||
|
||||
if (products.length > 0) {
|
||||
const productsGroup = {
|
||||
groupName: 'Products',
|
||||
options: []
|
||||
};
|
||||
|
||||
products.forEach((product) => {
|
||||
productsGroup.options.push({
|
||||
name: product.name,
|
||||
segment: `product:${product.slug}`,
|
||||
count: product.count?.members,
|
||||
class: 'segment-product'
|
||||
});
|
||||
});
|
||||
|
||||
options.push(productsGroup);
|
||||
}
|
||||
|
||||
this._options = options;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue