Skip to content

Commit a0e2374

Browse files
committed
Replace GeometryReader with iOS 17+ containerRelativeFrame to achieve the 0.5 width.
1 parent ebd00cb commit a0e2374

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Reader Messages/PointOfSalePaymentSuccessView.swift

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,12 @@ struct PointOfSalePaymentSuccessView: View {
4242
}
4343
}
4444

45-
GeometryReader { geometry in
46-
PaymentsActionButtons(isShowingSendReceiptView: $isShowingSendReceiptView,
47-
isShowingReceiptNotEligibleBanner: $isShowingReceiptNotEligibleBanner)
48-
.frame(width: geometry.size.width / 2)
49-
.frame(maxWidth: .infinity, alignment: .center)
50-
.offset(y: isViewLoaded ? 0 : -Constants.animationOffset)
51-
.opacity(isViewLoaded ? 1 : 0)
52-
}
45+
PaymentsActionButtons(isShowingSendReceiptView: $isShowingSendReceiptView,
46+
isShowingReceiptNotEligibleBanner: $isShowingReceiptNotEligibleBanner)
47+
.containerRelativeFrame(.horizontal, count: 2, span: 1, spacing: 0)
48+
.frame(maxWidth: .infinity, alignment: .center)
49+
.offset(y: isViewLoaded ? 0 : -Constants.animationOffset)
50+
.opacity(isViewLoaded ? 1 : 0)
5351
}
5452
.multilineTextAlignment(.center)
5553

0 commit comments

Comments
 (0)