diff Simoleon/ContentView.swift @ 50:7a6a7c677851

Handle errors with alerts
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Mon, 26 Jul 2021 21:52:15 +0100
parents 2eb05f396fcd
children b0bce2c8e4a9
line wrap: on
line diff
--- a/Simoleon/ContentView.swift	Mon Jul 26 21:22:54 2021 +0100
+++ b/Simoleon/ContentView.swift	Mon Jul 26 21:52:15 2021 +0100
@@ -8,10 +8,11 @@
 import SwiftUI
 
 struct ContentView: View {
-    @State private var tab: Tab = .convert
     @Environment(\.managedObjectContext) private var viewContext
     @FetchRequest(sortDescriptors: []) private var defaultCurrency: FetchedResults<DefaultCurrency>
     
+    @State private var tab: Tab = .convert
+    
     var body: some View {
         TabView(selection: $tab) {
             Conversion(currencyPair: defaultCurrency.first?.pair ?? "USD/GBP")