1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 14:50:32 +05:30
yattee/Apple TV/PopularVideosView.swift
2021-07-11 22:54:02 +02:00

23 lines
447 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)
#if !os(tvOS)
.navigationTitle("Popular")
#endif
.onAppear {
resource.loadIfNeeded()
}
}
}