yattee/Shared/Videos/VideosView.swift
2021-09-18 22:42:04 +02:00

31 lines
686 B
Swift

import Defaults
import SwiftUI
struct VideosView: View {
@EnvironmentObject<NavigationState> private var navigationState
#if os(tvOS)
@Default(.layout) private var layout
#endif
var videos: [Video]
var body: some View {
VStack {
#if os(tvOS)
if layout == .cells {
VideosCellsVertical(videos: videos)
} else {
VideosListView(videos: videos)
}
#else
VideosCellsVertical(videos: videos)
#endif
}
#if os(macOS)
.background()
.frame(minWidth: 360)
#endif
}
}