Update 'Add to bag' button price to show personalized price when design elements are added

This commit is contained in:
Andymick
2026-07-18 09:57:41 +01:00
parent a9513e7284
commit 0038d792b0
+1 -1
View File
@@ -867,7 +867,7 @@ export default function DesignCanvas({ product }: { product: ProductDTO }) {
onClick={handleAddToBag}
className="flex-1 bg-clay px-6 py-3 text-sm font-medium text-paper transition-colors hover:bg-clay-dark"
>
Add to bag <Price cents={product.effectivePrice * quantity} />
Add to bag <Price cents={(elements.length > 0 ? effectivePriceForPersonalised : product.effectivePrice) * quantity} />
</button>
</div>
{justAdded && <p className="text-sm text-pine">Added to your bag.</p>}