Ghost/ghost/admin/app/helpers/currency-symbol.js
2021-10-20 18:02:14 +05:30

15 lines
360 B
JavaScript

import Helper from '@ember/component/helper';
import {getSymbol} from 'ghost-admin/utils/currency';
import {inject as service} from '@ember/service';
export default class CurrencySymbolHelper extends Helper {
@service feature;
compute([currency]) {
if (currency) {
return getSymbol(currency);
}
return '';
}
}