Fix: check both elementsFront and elementsBack for price update
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={(elements.length > 0 ? effectivePriceForPersonalised : product.effectivePrice) * quantity} />
|
||||
Add to bag — <Price cents={((elementsFront.length > 0 || elementsBack.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