From 8a063b08051a85bf2beb716f899f990be9bb745b Mon Sep 17 00:00:00 2001 From: George Botros <78520093+george-botros@users.noreply.github.com> Date: Sun, 21 Jan 2024 13:57:21 -0500 Subject: [PATCH] fix: indicate venue is closed when it has no hours in detailed hours view --- .../Venue/Detail View/DiningVenueDetailHoursView.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PennMobile/Dining/SwiftUI/Views/Venue/Detail View/DiningVenueDetailHoursView.swift b/PennMobile/Dining/SwiftUI/Views/Venue/Detail View/DiningVenueDetailHoursView.swift index 8150f5a1e..505fb5ea4 100644 --- a/PennMobile/Dining/SwiftUI/Views/Venue/Detail View/DiningVenueDetailHoursView.swift +++ b/PennMobile/Dining/SwiftUI/Views/Venue/Detail View/DiningVenueDetailHoursView.swift @@ -28,6 +28,14 @@ struct DiningVenueDetailHoursView: View { .font(duration == Date().integerDayOfWeek ? .system(size: 18, weight: .bold): .system(size: 18, weight: .regular)) HStack { + if venue.formattedHoursArrayFor(date).isEmpty { + Text("Closed") + .padding(.vertical, 3) + .padding(.horizontal, 4) + .font(.system(size: 14, weight: .light, design: .default)) + .background(Color.grey5) + .clipShape(RoundedRectangle(cornerRadius: 6)) + } ForEach(venue.formattedHoursArrayFor(date), id: \.self) { hours in Text(hours) .padding(.vertical, 3)