123456789101112131415161718192021222324252627282930 |
- //
- // fiveConstantApp.swift
- // fiveConstant
- //
- // Created by 李建 on 2023/1/11.
- //
- import SwiftUI
- import AlertToast
- @main
- struct fiveConstantApp: App {
- @StateObject var progressState: ProgressState = ProgressState.manager
- @StateObject var hudState: HUD = HUD.instance
- var body: some Scene {
- WindowGroup {
- Group {
- if progressState.isNeedLogin {
- SmsLoginUIView()
- } else {
- ContentUIView(viewRouter: ViewRouter())
- }
- }
- .toast(isPresenting: $hudState.isPresendted, alert: {
- AlertToast(displayMode: hudState.displayMode, type: hudState.type, subTitle: hudState.title)
- })
- .environmentObject(progressState)
- }
-
- }
- }
|