diff LazyBear/Views/Home/Helpers/CurrencyRow.swift @ 453:37c13ebda381

Improve hierarchy and minor bugs fixed
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Sun, 27 Jun 2021 14:18:29 +0200
parents 4effac4733b0
children
line wrap: on
line diff
--- a/LazyBear/Views/Home/Helpers/CurrencyRow.swift	Sat Jun 26 18:45:31 2021 +0200
+++ b/LazyBear/Views/Home/Helpers/CurrencyRow.swift	Sun Jun 27 14:18:29 2021 +0200
@@ -9,8 +9,6 @@
 
 struct CurrencyRow: View {
     var latestCurrencies: [CurrencyModel]
-
-    @State private var showExtensiveList = false
     
     var body: some View {
         VStack(alignment: .leading) {
@@ -28,8 +26,14 @@
                 }
                 
                 Spacer()
-                Button("See all", action: { self.showExtensiveList = true })
-                    .buttonStyle(BorderlessButtonStyle())
+                NavigationLink(destination: CurrencySheet(latestCurrencies: latestCurrencies)
+                                .navigationTitle("Currencies")
+                ) {
+                    HStack {
+                        Text("See all")
+                        Image(systemName: "chevron.right")
+                    }
+                }
                     .padding(.horizontal)
             }
             
@@ -42,9 +46,6 @@
                 .padding()
             }
         }
-        .sheet(isPresented: $showExtensiveList) {
-            CurrencySheet(latestCurrencies: latestCurrencies)
-        }
     }
 }