Update 'Add to bag' button price to show personalized price when design elements are added
This commit is contained in:
@@ -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>}
|
||||
|
||||
Reference in New Issue
Block a user