Fix: check both elementsFront and elementsBack for price update

This commit is contained in:
Andymick
2026-07-18 09:58:40 +01:00
parent 0038d792b0
commit 755b7e786d
+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={(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>}