Files
WerkoutIOS/iphone/Werkout_ios/subview/Logoutview.swift
2024-12-19 21:57:59 -06:00

44 lines
1.0 KiB
Swift

//
// Logoutview.swift
// Werkout_ios
//
// Created by Trey Tartt on 6/16/24.
//
import SwiftUI
struct Logoutview: View {
@ObservedObject var userStore = UserStore.shared
var body: some View {
HStack {
Button("Logout", action: {
userStore.logout()
})
.frame(maxWidth: .infinity, alignment: .center)
.frame(height: 44)
.foregroundColor(.white)
.background(.red)
.cornerRadius(Constants.buttonRadius)
.padding()
.frame(maxWidth: .infinity)
Button(action: {
userStore.refreshUserData()
}, label: {
Image(systemName: "arrow.triangle.2.circlepath")
})
.frame(width: 44, height: 44)
.foregroundColor(.white)
.background(.green)
.cornerRadius(Constants.buttonRadius)
.padding()
.frame(maxWidth: .infinity)
}
}
}
#Preview {
Logoutview()
}