mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 08:18:19 +00:00
24 lines
509 B
Swift
24 lines
509 B
Swift
import Siesta
|
|
import SwiftUI
|
|
|
|
struct PopularView: View {
|
|
@StateObject private var store = Store<[Video]>()
|
|
|
|
@EnvironmentObject<InvidiousAPI> private var api
|
|
|
|
var resource: Resource {
|
|
api.popular
|
|
}
|
|
|
|
var body: some View {
|
|
VideosCellsVertical(videos: store.collection)
|
|
.onAppear {
|
|
resource.addObserver(store)
|
|
resource.loadIfNeeded()
|
|
}
|
|
#if !os(tvOS)
|
|
.navigationTitle("Popular")
|
|
#endif
|
|
}
|
|
}
|