Mercurial > public > lazybear
comparison LazyBear/Views/Company/Insiders.swift @ 403:48b3d2a410d4
Implementing Insiders.swift
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Sun, 23 May 2021 19:00:00 +0200 |
parents | |
children | c804ce7a1560 |
comparison
equal
deleted
inserted
replaced
402:8357b101df67 | 403:48b3d2a410d4 |
---|---|
1 // | |
2 // Insiders.swift | |
3 // LazyBear | |
4 // | |
5 // Created by Dennis Concepción Martín on 23/5/21. | |
6 // | |
7 | |
8 import SwiftUI | |
9 | |
10 struct Insiders: View { | |
11 @ObservedObject var company: Company | |
12 var symbol: String | |
13 | |
14 var body: some View { | |
15 if company.showInsidersView { | |
16 | |
17 } else { | |
18 ProgressView() | |
19 .onAppear { | |
20 // request API | |
21 } | |
22 } | |
23 } | |
24 } | |
25 | |
26 struct Insiders_Previews: PreviewProvider { | |
27 static var previews: some View { | |
28 Insiders(company: Company(), symbol: "aapl") | |
29 } | |
30 } |