mirror of
https://github.com/yattee/yattee.git
synced 2024-12-15 06:40:32 +05:30
20 lines
382 B
Swift
20 lines
382 B
Swift
import Siesta
|
|
import SwiftUI
|
|
|
|
struct PopularVideosView: View {
|
|
@ObservedObject private var store = Store<[Video]>()
|
|
|
|
var resource = InvidiousAPI.shared.popular
|
|
|
|
init() {
|
|
resource.addObserver(store)
|
|
}
|
|
|
|
var body: some View {
|
|
VideosView(videos: store.collection)
|
|
.onAppear {
|
|
resource.loadIfNeeded()
|
|
}
|
|
}
|
|
}
|