Skip to content

Commit 8225738

Browse files
committed
Update CartContents.component.tsx
1 parent e522a2c commit 8225738

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/Cart/CartContents.component.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,14 @@ const CartContents = () => {
9090
</div>
9191
<div className="flex-grow ml-4">
9292
<h2 className="text-lg font-semibold">{item.product.node.name}</h2>
93-
<p className="text-gray-600">{item.product.node.price}</p>
93+
{/* Display the price if available, otherwise show a placeholder */}
94+
<p className="text-gray-600">
95+
{item.product.node.priceHtml ? (
96+
<span dangerouslySetInnerHTML={{ __html: item.product.node.priceHtml }} />
97+
) : (
98+
'Price not available'
99+
)}
100+
</p>
94101
</div>
95102
<div className="flex items-center">
96103
<input

0 commit comments

Comments
 (0)