File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 1
1
import Link from 'next/link' ;
2
2
import { v4 } from 'uuid' ;
3
- import { useContext , useState , useEffect } from 'react' ;
3
+ import { useContext , useState } from 'react' ;
4
4
5
5
import { useQuery , useMutation } from '@apollo/react-hooks' ;
6
6
Original file line number Diff line number Diff line change 1
1
import MobileCartItem from './MobileCartItem.component' ;
2
2
3
- const MobileCart = ( { cart } ) => {
3
+ const MobileCart = ( { cart, handleRemoveProductClick } ) => {
4
4
return (
5
5
< section
6
6
//className="container mx-auto bg-white md:hidden lg:hidden xl:hidden"
7
7
className = "bg-white md:hidden lg:hidden xl:hidden"
8
8
>
9
9
< div className = "flex items-center justify-center" >
10
10
< div className = "container" >
11
- < table className = "flex flex-row flex-no-wrap my-5 overflow-hidden rounded-lg sm:bg-white sm:shadow-lg" style = { { width : "365px" } } >
11
+ < table
12
+ className = "flex flex-row flex-no-wrap my-5 overflow-hidden rounded-lg sm:bg-white sm:shadow-lg"
13
+ style = { { width : '365px' } }
14
+ >
12
15
< thead className = "text-black" >
13
16
< tr className = "flex flex-col mb-2 bg-gray-200 rounded-l-lg flex-no wrap sm:table-row sm:rounded-none sm:mb-0" >
14
17
< th className = "p-3 text-left" > Fjern</ th >
@@ -113,19 +116,14 @@ const MobileCart = ({ cart }) => {
113
116
</ div >
114
117
</ div >
115
118
116
- < div
117
- //className="flex flex-col"
118
- className = "flex flex-col justify-between"
119
- >
119
+ < div className = "flex flex-col justify-between" >
120
120
{ cart . products . length &&
121
121
cart . products . map ( ( item ) => (
122
122
< MobileCartItem
123
123
key = { item . productId }
124
124
item = { item }
125
125
products = { cart . products }
126
- // updateCartProcessing={updateCartProcessing}
127
- // handleRemoveProductClick={handleRemoveProductClick}
128
- // updateCart={updateCart}
126
+ handleRemoveProductClick = { handleRemoveProductClick }
129
127
/>
130
128
) ) }
131
129
</ div >
You can’t perform that action at this time.
0 commit comments