SUIExamplesApp.swift 704 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // SUIExamplesApp.swift
  3. // SUIExamples
  4. //
  5. // Created by Pavel Yurchenko on 17.08.2024.
  6. //
  7. import CoordinatorSUI
  8. import SwiftUI
  9. @main
  10. struct SUIExamplesApp: App {
  11. private static let coordinator = ApplicationCoordinator()
  12. private let applicationCoordinator = coordinator
  13. @StateObject private var router: Router = coordinator.currentRouter
  14. var body: some Scene {
  15. WindowGroup {
  16. NavigationStack(path: $router.path) {
  17. applicationCoordinator.run()
  18. .navigationDestination(
  19. for: Route.self,
  20. destination: applicationCoordinator.buildDestination
  21. )
  22. }
  23. }
  24. }
  25. }