Mercurial > public > lazybear
view LazyBear/Views/Search/CompanyList.swift @ 409:dc8dccd18e86
Minor UI changes
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Sun, 06 Jun 2021 19:07:21 +0200 |
parents | 0a4c399170c4 |
children | 5f21f7c23c5e |
line wrap: on
line source
// // CompanyList.swift // LazyBear // // Created by Dennis Concepción Martín on 3/4/21. // import SwiftUI struct CompanyList: View { var searchResult: [SearchResponse] var body: some View { List(searchResult, id: \.self) { company in NavigationLink(destination: CompanyView(symbol: company.symbol!)) { SearchedCompanyItem(company: company) } } } } struct CompanyList_Previews: PreviewProvider { @Environment(\.presentationMode) static var presentationMode static var previews: some View { CompanyList(searchResult: [SearchResponse(currency: "USD", region: "US", securityName: "aaple inc", symbol: "aapl"), SearchResponse(currency: "USD", region: "US", securityName: "aaple inc", symbol: "aapl"), SearchResponse(currency: "USD", region: "US", securityName: "aaple inc", symbol: "aapl"), SearchResponse(currency: "USD", region: "US", securityName: "aaple inc", symbol: "aapl"), SearchResponse(currency: "USD", region: "US", securityName: "aaple inc", symbol: "aapl")]) } }