mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Minor fixes, split files into folders
This commit is contained in:
22
Shared/Views/PopularView.swift
Normal file
22
Shared/Views/PopularView.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user