mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Add current locale to commerce provider
This commit is contained in:
@@ -26,6 +26,11 @@ const ProductCard: FC<Props> = ({
|
||||
priority,
|
||||
}) => {
|
||||
const src = p.images.edges?.[0]?.node.urlLarge!
|
||||
const { price } = usePrice({
|
||||
amount: p.prices?.price?.value,
|
||||
baseAmount: p.prices?.retailPrice?.value,
|
||||
currencyCode: p.prices?.price?.currencyCode!,
|
||||
})
|
||||
|
||||
if (variant === 'slim') {
|
||||
return (
|
||||
@@ -47,12 +52,6 @@ const ProductCard: FC<Props> = ({
|
||||
)
|
||||
}
|
||||
|
||||
const { price } = usePrice({
|
||||
amount: p.prices?.price?.value,
|
||||
baseAmount: p.prices?.retailPrice?.value,
|
||||
currencyCode: p.prices?.price?.currencyCode!,
|
||||
})
|
||||
|
||||
return (
|
||||
<Link href={`product${p.path}`}>
|
||||
<a
|
||||
|
Reference in New Issue
Block a user