File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { useState } from 'react';
4
4
import { v4 as uuidv4 } from 'uuid' ;
5
5
6
6
import SVGX from 'components/SVG/SVGX.component' ;
7
- import { getUpdatedItems } from 'utils/functions/functions' ;
7
+ import { getUpdatedItems , paddedPrice } from 'utils/functions/functions' ;
8
8
9
9
const CartItem = ( {
10
10
item,
@@ -14,6 +14,7 @@ const CartItem = ({
14
14
updateCartProcessing,
15
15
} ) => {
16
16
const [ productCount , setProductCount ] = useState ( item . qty ) ;
17
+ const totalPrice = paddedPrice ( item . totalPrice , 'kr' ) ;
17
18
18
19
/*
19
20
* When user changes the quantity, update the cart in localStorage
@@ -81,8 +82,8 @@ const CartItem = ({
81
82
</ td >
82
83
< td className = "px-4 py-2 border" >
83
84
{ 'string' !== typeof item . totalPrice
84
- ? item . totalPrice . toFixed ( 2 )
85
- : item . totalPrice }
85
+ ? totalPrice . toFixed ( 2 )
86
+ : totalPrice }
86
87
</ td >
87
88
</ tr >
88
89
) ;
You can’t perform that action at this time.
0 commit comments