1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 22:30:32 +05:30
yattee/Shared/Watch Now/WatchNowSection.swift
2021-09-18 22:42:04 +02:00

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()
}
}
}