
* reference type cypress working * refactor * remove screenshots * add reference * add slash marker * run tests based on shop version * fix run tests based on shop version * fix run tests based on shop version * change base url to localhost * fix plugins * fix plugins * fix plugins * fix plugins * fix plugins * fix plugins * fix yml * fix yml * chage file names * fix files names * fix broken imports add checking for errors in grpah responses * fix broken imports add checking for errors in grpah responses * update jest * fix snapshot
11 lines
341 B
JavaScript
11 lines
341 B
JavaScript
export function getFormattedCurrencyAmount(amount, currency) {
|
|
const language = window.navigator.userLanguage || window.navigator.language;
|
|
return amount.toLocaleString(language, {
|
|
currency,
|
|
style: "currency"
|
|
});
|
|
}
|
|
|
|
export function getCurrencyAndAmountInString(amount, currency) {
|
|
return `${currency}${amount.toFixed(2)}`;
|
|
}
|