mirror of
https://github.com/vercel/commerce.git
synced 2025-06-07 08:46:58 +00:00
Fix Product card hook
This commit is contained in:
parent
be80415614
commit
a067d19778
@ -6,8 +6,6 @@ import s from './ProductCard.module.css'
|
|||||||
import Image, { ImageProps } from 'next/image'
|
import Image, { ImageProps } from 'next/image'
|
||||||
import WishlistButton from '@components/wishlist/WishlistButton'
|
import WishlistButton from '@components/wishlist/WishlistButton'
|
||||||
import usePrice from '@framework/product/use-price'
|
import usePrice from '@framework/product/use-price'
|
||||||
import ProductTag from '../ProductTag'
|
|
||||||
import ProductCardExtended from '../ProductCardExtended/ProductCardExtended'
|
|
||||||
import { Stack, Text, Heading, Box, useColorModeValue } from '@chakra-ui/react'
|
import { Stack, Text, Heading, Box, useColorModeValue } from '@chakra-ui/react'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@ -40,6 +38,7 @@ const ProductCard: FC<Props> = ({
|
|||||||
)
|
)
|
||||||
|
|
||||||
const [isHover, setIsHover] = useState(false)
|
const [isHover, setIsHover] = useState(false)
|
||||||
|
const hoverCardBgColor = useColorModeValue('white', 'gray.800')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href={`/product/${product.slug}`}>
|
<Link href={`/product/${product.slug}`}>
|
||||||
@ -127,7 +126,7 @@ const ProductCard: FC<Props> = ({
|
|||||||
role={'group'}
|
role={'group'}
|
||||||
p={6}
|
p={6}
|
||||||
w={'full'}
|
w={'full'}
|
||||||
bg={useColorModeValue('white', 'gray.800')}
|
bg={hoverCardBgColor}
|
||||||
zIndex={1}>
|
zIndex={1}>
|
||||||
{process.env.COMMERCE_WISHLIST_ENABLED && (
|
{process.env.COMMERCE_WISHLIST_ENABLED && (
|
||||||
<WishlistButton
|
<WishlistButton
|
||||||
|
Loading…
x
Reference in New Issue
Block a user