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 11import Link from 'next/link' ;
22import Image from 'next/image' ;
3- import { useState } from 'react' ;
43
54interface ProductCardProps {
65 databaseId : number ;
@@ -19,31 +18,9 @@ const ProductCard = ({
1918 slug,
2019 image,
2120} : ProductCardProps ) => {
22- const [ isFavorite , setIsFavorite ] = useState ( false ) ;
23-
2421 return (
2522 < div className = "group" >
2623 < 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-
4724 < Link href = { `/produkt/${ slug } ?id=${ databaseId } ` } >
4825 { image ?. sourceUrl ? (
4926 < Image
You can’t perform that action at this time.
0 commit comments