[cart-guest-delivery-fee] Show login prompt instead of unavailable for guest cart delivery fee
Some checks failed
Validation (test + coverage) / test (push) Has been cancelled

This commit is contained in:
2026-09-15 08:33:07 -03:00
parent c6859bf9e3
commit 81528f805b
2 changed files with 14 additions and 6 deletions

View File

@@ -180,6 +180,9 @@ struct CartView: View {
}
private var deliveryFeeLabel: String {
guard appState.session.isAuthenticated else {
return "Login para calcular"
}
if isLoadingDeliveryFee {
return "Calculando..."
}
@@ -293,6 +296,11 @@ struct CartView: View {
selectedCustomerAddress = nil
return
}
guard appState.session.isAuthenticated else {
deliveryFee = nil
selectedCustomerAddress = nil
return
}
isLoadingDeliveryFee = true
defer { isLoadingDeliveryFee = false }