comparison LazyBear/Views/Company/Chart.swift @ 402:8357b101df67

Implementing CompanyView in NavigationLinks
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Fri, 21 May 2021 23:39:40 +0200
parents f843c6382529
children fd8df65927e9
comparison
equal deleted inserted replaced
401:f843c6382529 402:8357b101df67
22 var body: some View { 22 var body: some View {
23 if company.showChartView { 23 if company.showChartView {
24 VStack { 24 VStack {
25 DatePicker(ranges: ranges, selectedRange: $selectedRange) 25 DatePicker(ranges: ranges, selectedRange: $selectedRange)
26 .onChange(of: selectedRange, perform: { range in 26 .onChange(of: selectedRange, perform: { range in
27 // let url = "https://api.lazybear.app/company/chart/type=init/symbol=\(symbol)/range=\(range)" 27 let url = "https://api.lazybear.app/company/chart/type=refresh/symbol=\(symbol)/range=\(range.lowercased())"
28 // company.request(url, .refresh, "chart") 28 company.request(url, .refresh, "chart")
29 }) 29 })
30 30
31 RoundedRectangle(cornerRadius: 15) 31 RoundedRectangle(cornerRadius: 15)
32 .foregroundColor(Color(.secondarySystemBackground)) 32 .foregroundColor(Color(.secondarySystemBackground))
33 .frame(height: 270) 33 .frame(height: 270)