screen bug fix
This commit is contained in:
8
src/helpers/formatPrice.ts
Normal file
8
src/helpers/formatPrice.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export const formatPrice = (amount: number | string) => {
|
||||
const numericAmount = Number(amount) || 0;
|
||||
const formatted = numericAmount
|
||||
.toString()
|
||||
.replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
|
||||
|
||||
return formatted;
|
||||
};
|
||||
Reference in New Issue
Block a user