Skip to content

Commit

Permalink
Merge pull request #504 from pennlabs/george-botros/fix-empty-hours-d…
Browse files Browse the repository at this point in the history
…etailed-venue-view

fix: indicate venue is closed when it has no hours in detailed hours views
  • Loading branch information
JHawk0224 authored Jan 21, 2024
2 parents 723b436 + 8a063b0 commit 38d9e2f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 38d9e2f

Please sign in to comment.