Skip to content

Commit

Permalink
Update ENGAGEHF/Education/Education.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulGoldschmidt committed Sep 13, 2024
1 parent aadcf0c commit eb43176
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ENGAGEHF/Education/Education.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ struct Education: View {

NavigationStack(path: $navigationManager.educationPath) {
Group {
if videoManager.videoCollections.isEmpty || videoManager.videoCollections.allSatisfy({ $0.videos.isEmpty }) {
let videoCollections = videoManager.videoCollections.filter { !$0.videos.isEmpty }
if videoCollections.isEmpty {
ContentUnavailableView(
"No Educational Videos",
systemImage: "video.slash",
description: Text("There are currently no educational videos available.")
)
} else {
VideoList(videoCollections: videoManager.videoCollections.filter { !$0.videos.isEmpty })
VideoList(videoCollections: videoCollections)
}
}
.accessibilityIdentifier("Video List")
Expand Down

0 comments on commit eb43176

Please sign in to comment.