1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 06:10:32 +05:30
yattee/Shared/Views/PopularView.swift
2021-10-21 01:56:40 +02:00

26 lines
598 B
Swift

import Siesta
import SwiftUI
struct PopularView: View {
@StateObject private var store = Store<[Video]>()
@EnvironmentObject<AccountsModel> private var accounts
var resource: Resource? {
accounts.api.popular
}
var body: some View {
PlayerControlsView {
VideosCellsVertical(videos: store.collection)
.onAppear {
resource?.addObserver(store)
resource?.loadIfNeeded()
}
#if !os(tvOS)
.navigationTitle("Popular")
#endif
}
}
}