Ghost/ghost/admin/app/helpers/gh-price-amount.js
Rishabh 6165441c30 Added UI for handling multiple tiers in membership settings
refs https://github.com/TryGhost/Team/issues/715

Adds new modal and component to handle managing a list of products(tiers) in Admin behind the developer experiments flag. Also adds a new helper for stripe prices to convert amount from decimal value.
2021-06-04 13:30:11 +05:30

14 lines
326 B
JavaScript

import {helper} from '@ember/component/helper';
export function ghPriceAmount(amount) {
if (amount) {
return Math.round(amount / 100);
}
return 0;
}
// like {{pluralize}} but formats the number according to current locale
export default helper(function ([amount]) {
return ghPriceAmount(amount);
});