update
This commit is contained in:
4
src/lib/formatPrice.ts
Normal file
4
src/lib/formatPrice.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export const formatCurrency = (value: number | string) => {
|
||||
const num = typeof value === 'string' ? parseInt(value) : value;
|
||||
return num.toLocaleString('vi-VN');
|
||||
};
|
||||
Reference in New Issue
Block a user