diff options
author | Shav Kinderlehrer <[email protected]> | 2024-02-21 12:20:24 -0500 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2024-02-21 12:20:24 -0500 |
commit | ce0be87c7f39e9763d835a685cb65eb38c7e68c3 (patch) | |
tree | a548887701d035f40923de1838317d213a8a2532 /Jel/Views/Settings/SettingsView.swift | |
parent | 53b079259556532569af3af0e3b15aa887adbfd4 (diff) | |
download | jel-ce0be87c7f39e9763d835a685cb65eb38c7e68c3.tar.gz jel-ce0be87c7f39e9763d835a685cb65eb38c7e68c3.zip |
Cleanup + change SignInView to be a sheet
Diffstat (limited to 'Jel/Views/Settings/SettingsView.swift')
-rw-r--r-- | Jel/Views/Settings/SettingsView.swift | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Jel/Views/Settings/SettingsView.swift b/Jel/Views/Settings/SettingsView.swift index cff1fc3..8cd5a8a 100644 --- a/Jel/Views/Settings/SettingsView.swift +++ b/Jel/Views/Settings/SettingsView.swift @@ -11,9 +11,9 @@ import PulseUI struct SettingsView: View { @Binding var showingSettingsView: Bool - @StateObject var authState: AuthStateController = AuthStateController.shared - + @ObservedObject var authState: AuthStateController = AuthStateController.shared @ObservedObject var settingsController: SettingsController = SettingsController.shared + var body: some View { NavigationStack { Form { @@ -35,7 +35,11 @@ struct SettingsView: View { Button(role: .destructive) { authState.loggedIn = false + authState.authToken = nil authState.save() + + showingSettingsView.toggle() + settingsController.save() } label: { Text("Sign out") } |