21 lines
385 B
Swift
21 lines
385 B
Swift
|
|
import SwiftUI
|
||
|
|
|
||
|
|
struct ContentView: View {
|
||
|
|
@StateObject private var authManager = AuthenticationManager()
|
||
|
|
|
||
|
|
var body: some View {
|
||
|
|
if authManager.isAuthenticated {
|
||
|
|
DashboardView()
|
||
|
|
} else {
|
||
|
|
LoginView()
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
struct ContentView_Previews: PreviewProvider {
|
||
|
|
static var previews: some View {
|
||
|
|
ContentView()
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|