mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 22:30:32 +05:30
24 lines
504 B
Swift
24 lines
504 B
Swift
import Siesta
|
|
import SwiftUI
|
|
|
|
struct WatchNowSection: View {
|
|
@ObservedObject private var store = Store<[Video]>()
|
|
|
|
let resource: Resource
|
|
let label: String
|
|
|
|
init(resource: Resource, label: String) {
|
|
self.resource = resource
|
|
self.label = label
|
|
|
|
self.resource.addObserver(store)
|
|
}
|
|
|
|
var body: some View {
|
|
WatchNowSectionBody(label: label, videos: store.collection)
|
|
.onAppear {
|
|
resource.loadIfNeeded()
|
|
}
|
|
}
|
|
}
|