aris
09/20/2024, 1:40 PMstruct ContentView: View {
@StateViewModel
var viewModel = HomeViewModel(
repository: KoinDependencies().repository
)
var body: some View {
if let characters = viewModel.example, !characters.isEmpty {
NavigationStack {
ScrollView {
LazyVStack(alignment: .leading, spacing: 20) {
ForEach(characters, id: \.self) { item in
NavigationLink(destination: {}) {
ItemList(item: item, onClick: {})
}
.buttonStyle(PlainButtonStyle())
}
}
.padding(.horizontal)
}
}
} else {
Text("No data available")
}
But know, for paging I cannot understand the cashapp documentation