summaryrefslogtreecommitdiff
path: root/Jel/ContentView.swift
blob: 356615d67704ea7f597091e22589147d2a1c95a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
//  ContentView.swift
//  Jel
//
//  Created by zerocool on 12/11/23.
//

import SwiftUI

struct ContentView: View {
  @ObservedObject var authState: AuthStateController
  var body: some View {
        VStack {
          if !authState.loggedIn {
            SignInView(authState: authState)
          } else {
            Text("Logged in")
            Button("Log out") {
              authState.loggedIn = false
              authState.save()
            }
          }
        }
        .padding()
    }
}

#Preview {
  ContentView(authState: AuthStateController())
}