mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Added portal option to default product for tiers UI
refs https://github.com/TryGhost/Team/issues/715 By default, the first product/tier is available in Portal at the moment, this adds an attribute that can be used to denote which product is active in Portal in UI
This commit is contained in:
parent
ba149afcc3
commit
5f538b5036
@ -14,7 +14,15 @@ export default class extends Component {
|
||||
@tracked productModel = null;
|
||||
|
||||
get products() {
|
||||
return this.args.products;
|
||||
return this.args.products.map((product, idx) => {
|
||||
if (idx === 0) {
|
||||
return {
|
||||
...product.toJSON(),
|
||||
portal: true
|
||||
};
|
||||
}
|
||||
return product;
|
||||
});
|
||||
}
|
||||
|
||||
@action
|
||||
|
Loading…
Reference in New Issue
Block a user