Skip to content

Commit

Permalink
Add product slug to imageUrl in product-card
Browse files Browse the repository at this point in the history
  • Loading branch information
armans-code committed Oct 22, 2024
1 parent 5dd7a88 commit a202bd9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/ui/product-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export function ProductLink(props: {
<NextImage
loading={props.loading}
decoding="sync"
src={imageUrl ?? "/placeholder.svg?height=48&width=48"}
src={
imageUrl
? imageUrl + `?product=${product.slug}`
: "/placeholder.svg?height=48&width=48"
}
alt={`A small picture of ${product.name}`}
width={48}
height={48}
Expand Down

0 comments on commit a202bd9

Please sign in to comment.