diff Simoleon/Helpers/CurrencyRow.swift @ 75:b6f8661300f2

Added isLocked to CurrencyPairs
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Fri, 30 Jul 2021 15:52:27 +0100
parents c7b6249ab745
children 1069c33d3a42
line wrap: on
line diff
--- a/Simoleon/Helpers/CurrencyRow.swift	Thu Jul 29 17:01:15 2021 +0100
+++ b/Simoleon/Helpers/CurrencyRow.swift	Fri Jul 30 15:52:27 2021 +0100
@@ -8,13 +8,12 @@
 import SwiftUI
 
 struct CurrencyRow: View {
-    var currencyPair: String
-    
+    var currencyPairName: String
     let currencyMetadata: [String: CurrencyMetadataModel] = parseJson("CurrencyMetadata.json")
     
     var body: some View {
         HStack {
-            let currencies = currencyPair.split(separator: "/")
+            let currencies = currencyPairName.split(separator: "/")
             Image(currencyMetadata[String(currencies[0])]!.flag)
                 .resizable()
                 .aspectRatio(contentMode: .fill)
@@ -43,6 +42,6 @@
 
 struct CurrencyRow_Previews: PreviewProvider {
     static var previews: some View {
-        CurrencyRow(currencyPair: "USD/GBP")
+        CurrencyRow(currencyPairName: "USD/GBP")
     }
 }