comparison LazyBear/Views/Company/Insiders.swift @ 412:a7c9dd0c5822

Main insider view implemented
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Tue, 08 Jun 2021 11:46:58 +0200
parents 681fb377235e
children
comparison
equal deleted inserted replaced
411:681fb377235e 412:a7c9dd0c5822
11 @ObservedObject var company: Company 11 @ObservedObject var company: Company
12 var symbol: String 12 var symbol: String
13 13
14 var body: some View { 14 var body: some View {
15 if company.showInsidersView { 15 if company.showInsidersView {
16 if let insiderSummary = company.insidersData.insiderRoster { 16 VStack {
17 InsiderList(insiderSummary: insiderSummary, numberOfRows: 4) 17 if let insiderSummary = company.insidersData.insiderRoster {
18 } 18 InsiderList(insiderSummary: insiderSummary)
19 19 .padding(.bottom)
20 if let insiderTransactions = company.insidersData.insiderTransactions { 20 }
21 21
22 if let transactions = company.insidersData.insiderTransactions {
23 TransactionList(transactions: transactions)
24 }
22 } 25 }
23 } else { 26 } else {
24 ProgressView() 27 ProgressView()
25 .onAppear { 28 .onAppear {
26 let url = "https://api.lazybear.app/company/insiders/symbol=\(symbol)" 29 let url = "https://api.lazybear.app/company/insiders/symbol=\(symbol)"