File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change 1
1
import Link from 'next/link' ;
2
2
import Image from 'next/image' ;
3
- import { useState } from 'react' ;
4
3
5
4
interface ProductCardProps {
6
5
databaseId : number ;
@@ -19,31 +18,9 @@ const ProductCard = ({
19
18
slug,
20
19
image,
21
20
} : ProductCardProps ) => {
22
- const [ isFavorite , setIsFavorite ] = useState ( false ) ;
23
-
24
21
return (
25
22
< div className = "group" >
26
23
< div className = "aspect-[3/4] overflow-hidden bg-gray-100 relative" >
27
- < button
28
- onClick = { ( ) => setIsFavorite ( ! isFavorite ) }
29
- className = "absolute right-4 top-4 z-10 rounded-full bg-white p-2 hover:scale-110 transition-transform duration-200"
30
- >
31
- < svg
32
- className = { `h-5 w-5 ${
33
- isFavorite ? 'fill-red-500' : 'fill-none stroke-gray-600'
34
- } `}
35
- viewBox = "0 0 24 24"
36
- stroke = "currentColor"
37
- strokeWidth = "2"
38
- >
39
- < path
40
- strokeLinecap = "round"
41
- strokeLinejoin = "round"
42
- d = "M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"
43
- />
44
- </ svg >
45
- </ button >
46
-
47
24
< Link href = { `/produkt/${ slug } ?id=${ databaseId } ` } >
48
25
{ image ?. sourceUrl ? (
49
26
< Image
You can’t perform that action at this time.
0 commit comments