diff Simoleon/Helpers/Flag.swift @ 187:13d5a8deb6c2

add AboutView and FavoritesView
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Thu, 23 Dec 2021 16:12:22 +0100
parents 2fc95efcb1ee
children
line wrap: on
line diff
--- a/Simoleon/Helpers/Flag.swift	Thu Dec 23 11:30:38 2021 +0100
+++ b/Simoleon/Helpers/Flag.swift	Thu Dec 23 16:12:22 2021 +0100
@@ -8,10 +8,10 @@
 import SwiftUI
 
 struct Flag: View {
-    var flagName: String
+    var currencyCode: String
     
     var body: some View {
-        Image(flagName)
+        Image(String(currencyCode.dropLast()))
             .resizable()
             .aspectRatio(contentMode: .fill)
             .frame(width: 35, height: 35)
@@ -21,6 +21,6 @@
 
 struct Flag_Previews: PreviewProvider {
     static var previews: some View {
-        Flag(flagName: "EU")
+        Flag(currencyCode: "EUR")
     }
 }