| 1234567891011121314151617181920212223242526272829303132333435 |
- //
- // SUIExamplesApp.swift
- // SUIExamples
- //
- // Created by Pavel Yurchenko on 17.08.2024.
- //
- import CoordinatorSUI
- import SwiftUI
- @main
- struct SUIExamplesApp: App {
- private let applicationCoordinator = ApplicationCoordinator()
- @StateObject private var router: Router = ApplicationCoordinator.rootRouter
- var body: some Scene {
- WindowGroup {
- NavigationStack(path: $router.path) {
- MainBuilder().build(
- with: .init(
- onProducts: {
- router.path.append(
- Route.products
- )
- })
- )
- .navigationDestination(
- for: Route.self,
- destination: applicationCoordinator.buildDestination
- )
- }
- }
- }
- }
|