mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 22:00:31 +05:30
23 lines
441 B
Swift
23 lines
441 B
Swift
import Siesta
|
|
import SwiftUI
|
|
|
|
struct PopularView: View {
|
|
@ObservedObject private var store = Store<[Video]>()
|
|
|
|
var resource = InvidiousAPI.shared.popular
|
|
|
|
init() {
|
|
resource.addObserver(store)
|
|
}
|
|
|
|
var body: some View {
|
|
VideosView(videos: store.collection)
|
|
#if !os(tvOS)
|
|
.navigationTitle("Popular")
|
|
#endif
|
|
.onAppear {
|
|
resource.loadIfNeeded()
|
|
}
|
|
}
|
|
}
|