Mercurial > public > lazybear
comparison LazyBear/Views/Home/Helpers/CurrencyRow.swift @ 424:6dd97877f575
Improve code, reorganize files
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Sun, 13 Jun 2021 19:40:42 +0200 |
parents | a0cf8fe47044 |
children | 4effac4733b0 |
comparison
equal
deleted
inserted
replaced
423:bdfdf3a1b34e | 424:6dd97877f575 |
---|---|
7 | 7 |
8 import SwiftUI | 8 import SwiftUI |
9 | 9 |
10 struct CurrencyRow: View { | 10 struct CurrencyRow: View { |
11 var latestCurrencies: [String: CurrencyModel] | 11 var latestCurrencies: [String: CurrencyModel] |
12 | 12 |
13 @Environment(\.managedObjectContext) private var moc | |
14 @State private var showExtensiveList = false | 13 @State private var showExtensiveList = false |
15 | 14 |
16 var body: some View { | 15 var body: some View { |
17 VStack(alignment: .leading) { | 16 VStack(alignment: .leading) { |
18 HStack(alignment: .bottom) { | 17 HStack(alignment: .bottom) { |
42 } | 41 } |
43 .padding() | 42 .padding() |
44 } | 43 } |
45 } | 44 } |
46 .sheet(isPresented: $showExtensiveList) { | 45 .sheet(isPresented: $showExtensiveList) { |
47 ExtensiveList(listName: "Currencies", latestCurrencies: latestCurrencies, addOnDelete: false) | 46 CurrencySheet(latestCurrencies: latestCurrencies) |
48 .environment(\.managedObjectContext, self.moc) | |
49 } | 47 } |
50 } | 48 } |
51 } | 49 } |
52 | 50 |
53 struct CurrencyRow_Previews: PreviewProvider { | 51 struct CurrencyRow_Previews: PreviewProvider { |