fix(checkout): display snackbar on top of sheet modals

This commit is contained in:
Daniel Arantes Loverde
2026-06-04 16:17:34 -03:00
parent 39ddf9c86c
commit eae9613ed5

View File

@@ -929,6 +929,7 @@ struct CardSelectionSheet: View {
}
var body: some View {
ZStack(alignment: .top) {
VStack(spacing: 0) {
// Header
HStack {
@@ -1013,6 +1014,9 @@ struct CardSelectionSheet: View {
}
)
}
SnackbarOverlay(center: SnackbarCenter.shared)
}
}
private func savedCardRow(_ card: SavedCard) -> some View {
@@ -1133,6 +1137,7 @@ struct PaymentCardView: View {
}
var body: some View {
ZStack(alignment: .top) {
VStack(spacing: 0) {
HStack {
Text("Novo Cartão")
@@ -1163,6 +1168,7 @@ struct PaymentCardView: View {
Text("Total do Pedido")
.font(AppTypography.caption)
.foregroundStyle(AppColors.textMuted)
.textCase(nil)
Text(formatCurrency(context.total))
.font(AppTypography.heading2)
.foregroundStyle(AppColors.textPrimary)
@@ -1264,9 +1270,11 @@ struct PaymentCardView: View {
}
.padding(20)
}
}
.background(AppColors.backgroundLight)
} // VStack
.background(AppColors.backgroundLight)
SnackbarOverlay(center: SnackbarCenter.shared)
}
}
@MainActor
@@ -1527,6 +1535,7 @@ struct ChangePaymentCardSheet: View {
}
var body: some View {
ZStack(alignment: .top) {
VStack(spacing: 0) {
HStack {
Text("Cartão de Crédito").font(AppTypography.heading2).foregroundStyle(AppColors.textPrimary)
@@ -1590,6 +1599,9 @@ struct ChangePaymentCardSheet: View {
showNewCardForm = false; onConfirmed(orderId, shortId)
}
}
SnackbarOverlay(center: SnackbarCenter.shared)
}
}
@MainActor
@@ -1688,6 +1700,7 @@ struct ChangePaymentNewCardView: View {
}
var body: some View {
ZStack(alignment: .top) {
VStack(spacing: 0) {
HStack {
Text("Novo Cartão").font(AppTypography.heading2).foregroundStyle(AppColors.textPrimary)
@@ -1737,6 +1750,9 @@ struct ChangePaymentNewCardView: View {
}
}
.background(AppColors.backgroundLight)
SnackbarOverlay(center: SnackbarCenter.shared)
}
}
@MainActor