29 lines
490 B
Swift
29 lines
490 B
Swift
//
|
|
// RootView.swift
|
|
// punchnet
|
|
//
|
|
// Created by 安礼成 on 2026/1/19.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct RootView: View {
|
|
@State private var userContext = UserContext()
|
|
|
|
var body: some View {
|
|
Group {
|
|
if userContext.isLogined {
|
|
NetworkView()
|
|
.environment(userContext)
|
|
} else {
|
|
LoginView()
|
|
.environment(userContext)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
RootView()
|
|
}
|