Skip to content
Snippets Groups Projects
Commit a3fe2bb0 authored by Princelle Maxime's avatar Princelle Maxime :gay_pride_flag:
Browse files

:lipstick: render price with comma

parent 146b98e8
1 merge request!7🔀 V1
......@@ -12,7 +12,7 @@ const Cart = () => {
function renderPrice(price: number): string {
// Render price with currency and fix displaying of price
return `${price.toFixed(2)} €`;
return `${price.toFixed(2).replace(".", ",")} €`;
}
let [totalPrice, setTotalPrice] = useState(0);
......
......@@ -28,8 +28,8 @@ const SellListItem = ({product}: {product: Product}) => {
}
function renderPrice(price: number): string {
// Render price with currency and fix displaying of price
return `${price.toFixed(2)} €`;
// Render price with currency and fix displaying of price
return `${price.toFixed(2).replace(".", ",")} €`;
}
function renderStock(stock: number): string {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment