| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- //
- // SUIExamplesApp.swift
- // SUIExamples
- //
- // Created by Pavel Yurchenko on 17.08.2024.
- //
- import CoordinatorSUI
- import SwiftUI
- @main
- struct SUIExamplesApp: App {
- private let applicationCoordinator = ApplicationCoordinator()
- @State private var router: Router = Router()
- init() {
- self.applicationCoordinator.currentRouter = router
- }
- var body: some Scene {
- WindowGroup {
- NavigationStack(path: $router.path) {
- MainBuilder().build(
- with: .init(
- onProducts: {
- applicationCoordinator.currentRouter.push(
- Route.products
- )
- })
- )
- .navigationDestination(
- for: Route.self
- ) { _ in
- print("Destination")
- return EmptyView()
- }
- // .navigationDestination(
- // for: Route.self,
- // destination: applicationCoordinator.buildDestination
- // )
- }
- }
- }
- }
|