summaryrefslogtreecommitdiff
path: root/Jel/ContentView.swift
blob: 2c388bebf827abdc046617caddfc3930e3802881 (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
31
//
//  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 {
            AddServerView(authState: authState)
          } else {
            Text("Logged in")
            Button("Log out") {
              authState.loggedIn = false
              authState.save()
            }
          }
        }
        .padding()
    }
}

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