summaryrefslogtreecommitdiff
path: root/Jel/Views
diff options
context:
space:
mode:
Diffstat (limited to 'Jel/Views')
-rw-r--r--Jel/Views/ContentView.swift30
1 files changed, 30 insertions, 0 deletions
diff --git a/Jel/Views/ContentView.swift b/Jel/Views/ContentView.swift
new file mode 100644
index 0000000..356615d
--- /dev/null
+++ b/Jel/Views/ContentView.swift
@@ -0,0 +1,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())
+}