Skip to content

Commit 452ba26

Browse files
committed
Adopt BookingListView
1 parent de658b4 commit 452ba26

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

WooCommerce/Classes/Bookings/BookingList/BookingListView.swift

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -134,25 +134,14 @@ private extension BookingListView {
134134
.foregroundStyle(Color.secondary)
135135

136136
HStack {
137-
// TODO: update this when attendance status is available
138-
// Update badge colors if design changes as statuses are not clarified now.
139-
statusBadge(text: booking.attendanceStatus.localizedTitle, color: Layout.defaultBadgeColor)
140-
statusBadge(text: booking.bookingStatus.localizedTitle, color: Layout.defaultBadgeColor)
137+
BookingBadgeView(booking.attendanceStatus)
138+
BookingBadgeView(booking.bookingStatus)
141139
Spacer()
142140
}
143141
}
144142
}
145143
}
146144

147-
func statusBadge(text: String, color: Color) -> some View {
148-
Text(text)
149-
.font(.caption2)
150-
.foregroundStyle(Color.primary)
151-
.padding(.horizontal, 8)
152-
.padding(.vertical, 4)
153-
.background(color.clipShape(RoundedRectangle(cornerRadius: 4)))
154-
}
155-
156145
func emptyStateView(isSearching: Bool, onRefresh: @escaping () async -> Void) -> some View {
157146
GeometryReader { proxy in
158147
ScrollView {
@@ -225,7 +214,6 @@ private extension BookingListView {
225214
static let viewPadding: CGFloat = 16
226215
static let emptyStatePadding: CGFloat = 24
227216
static let emptyStateImageWidth: CGFloat = 67
228-
static let defaultBadgeColor = Color(uiColor: .init(light: .systemGray6, dark: .systemGray5))
229217
static let cornerRadius: CGFloat = 8
230218
}
231219

0 commit comments

Comments
 (0)