Skip to content

Commit fbe50e9

Browse files
committed
Omit empty customer/service line in header
1 parent 55001de commit fbe50e9

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

WooCommerce/Classes/ViewRelated/Bookings/Booking Details/HeaderView.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ extension BookingDetailsView {
66

77
var body: some View {
88
VStack(alignment: .leading, spacing: Layout.headerContentVerticalPadding) {
9-
Text(content.bookingDate)
10-
.font(TextFont.bodyMedium)
11-
.foregroundColor(.primary)
12-
Text(content.serviceAndCustomerLine)
13-
.font(.footnote.weight(.medium))
14-
.foregroundColor(.secondary)
9+
if !content.bookingDate.isEmpty {
10+
Text(content.bookingDate)
11+
.font(TextFont.bodyMedium)
12+
.foregroundColor(.primary)
13+
}
14+
if !content.serviceAndCustomerLine.isEmpty {
15+
Text(content.serviceAndCustomerLine)
16+
.font(.footnote.weight(.medium))
17+
.foregroundColor(.secondary)
18+
}
1519
HStack {
1620
ForEach(content.status, id: \.self) { status in
1721
Text(status.labelText)

0 commit comments

Comments
 (0)