@@ -9,6 +9,7 @@ const MobileCartItem = ({
99 products,
1010 handleRemoveProductClick,
1111 updateCart,
12+ updateCartProcessing,
1213} ) => {
1314 const [ productCount , setProductCount ] = useState ( item . qty ) ;
1415
@@ -24,10 +25,9 @@ const MobileCartItem = ({
2425 if ( process . browser ) {
2526 event . stopPropagation ( ) ;
2627 // Return if the previous update cart mutation request is still processing
27- /*
2828 if ( updateCartProcessing ) {
2929 return ;
30- }*/
30+ }
3131 // If the user tries to delete the count of product, set that to 1 by default ( This will not allow him to reduce it less than zero )
3232 const newQty = event . target . value ? parseInt ( event . target . value ) : 1 ;
3333 // Set the new quantity in state.
@@ -49,32 +49,30 @@ const MobileCartItem = ({
4949 return (
5050 < >
5151 < tr className = "flex flex-col mb-2 flex-no wrap sm:table-row sm:mb-0" >
52- < td className = "h-12 p-3 border-2 border-gray-400 " >
53- < SVGX
54- cartKey = { item . cartKey }
55- handleRemoveProductClick = { handleRemoveProductClick }
56- products = { products }
57- />
58- </ td >
59- < td className = "h-12 p-3 border-l-2 border-r-2 border-gray-400 " >
60- { item . name }
52+ < td className = "h-12 p-3" >
53+ < SVGX
54+ cartKey = { item . cartKey }
55+ handleRemoveProductClick = { handleRemoveProductClick }
56+ products = { products }
57+ />
6158 </ td >
62- < td className = "h-12 p-3 border-2 border-gray-400 " >
63- { 'string' !== typeof item . price ? item . price . toFixed ( 2 ) : item . price }
59+ < td className = "h-12 p-3" > { item . name } </ td >
60+ < td className = "h-12 p-3" >
61+ kr{ 'string' !== typeof item . price ? item . price . toFixed ( 2 ) : item . price }
6462 </ td >
65- < td className = "h-12 p-3 border-l-2 border-r-2 border-gray-400 " >
66- < input
67- className = "w-12"
68- type = "number"
69- min = "1"
70- defaultValue = { productCount }
71- onChange = { ( event ) => handleQuantityChange ( event , item . cartKey ) }
72- />
63+ < td className = "h-12 p-3" >
64+ < input
65+ className = "w-12"
66+ type = "number"
67+ min = "1"
68+ defaultValue = { productCount }
69+ onChange = { ( event ) => handleQuantityChange ( event , item . cartKey ) }
70+ />
7371 </ td >
74- < td className = "h-12 p-3 border-2 border-gray-400 " >
75- { 'string' !== typeof item . totalPrice
76- ? item . totalPrice . toFixed ( 2 )
77- : item . totalPrice }
72+ < td className = "h-12 p-3" >
73+ { 'string' !== typeof item . totalPrice
74+ ? item . totalPrice . toFixed ( 2 )
75+ : item . totalPrice }
7876 </ td >
7977 </ tr >
8078 </ >
0 commit comments