1
1
import { useContext } from 'react' ;
2
-
3
2
import Link from 'next/link' ;
4
3
5
4
import { AppContext } from 'utils/context/AppContext' ;
@@ -9,17 +8,19 @@ import { AppContext } from 'utils/context/AppContext';
9
8
* Currently only displays a sample cart.
10
9
* Displays amount of items in cart.
11
10
*/
12
- const Cart = ( ) => {
11
+ const Cart = ( ) => {
13
12
const [ cart , setCart ] = useContext ( AppContext ) ;
14
-
15
13
16
14
const productsCount =
17
15
null !== cart && Object . keys ( cart ) . length ? cart . totalProductsCount : '' ;
18
16
19
17
return (
20
18
< >
21
19
< Link href = "/handlekurv" >
22
- < a className = "inline-block pl-3 no-underline hover:text-black" aria-label = "Handlekurv" >
20
+ < a
21
+ className = "inline-block pl-3 no-underline hover:text-black"
22
+ aria-label = "Handlekurv"
23
+ >
23
24
< svg
24
25
className = "fill-current hover:text-black"
25
26
xmlns = "http://www.w3.org/2000/svg"
@@ -28,11 +29,12 @@ const Cart = () => {
28
29
viewBox = "0 0 24 24"
29
30
aria-label = "Handlekurv"
30
31
>
31
- < path d = "M21,7H7.462L5.91,3.586C5.748,3.229,5.392,3,5,3H2v2h2.356L9.09,15.414C9.252,15.771,9.608,16,10,16h8 c0.4,0,0.762-0.238,0.919-0.606l3-7c0.133-0.309,0.101-0.663-0.084-0.944C21.649,7.169,21.336,7,21,7z M17.341,14h-6.697L8.371,9 h11.112L17.341,14z"
32
- aria-label = "Handlekurv"
32
+ < path
33
+ d = "M21,7H7.462L5.91,3.586C5.748,3.229,5.392,3,5,3H2v2h2.356L9.09,15.414C9.252,15.771,9.608,16,10,16h8 c0.4,0,0.762-0.238,0.919-0.606l3-7c0.133-0.309,0.101-0.663-0.084-0.944C21.649,7.169,21.336,7,21,7z M17.341,14h-6.697L8.371,9 h11.112L17.341,14z"
34
+ aria-label = "Handlekurv"
33
35
/>
34
- < circle cx = "10.5" cy = "18.5" r = "1.5" aria-label = "Handlekurv" />
35
- < circle cx = "17.5" cy = "18.5" r = "1.5" aria-label = "Handlekurv" />
36
+ < circle cx = "10.5" cy = "18.5" r = "1.5" aria-label = "Handlekurv" />
37
+ < circle cx = "17.5" cy = "18.5" r = "1.5" aria-label = "Handlekurv" />
36
38
</ svg >
37
39
</ a >
38
40
</ Link >
0 commit comments