IceCubes/IceCubesApp/App/Tabs/NavigationTab.swift
2023-12-28 09:37:02 +01:00

23 lines
438 B
Swift

import SwiftUI
import Env
@MainActor
struct NavigationTab<Content: View>: View {
var content: () -> Content
@State private var routerPath = RouterPath()
init(@ViewBuilder content: @escaping () -> Content) {
self.content = content
}
var body: some View {
NavigationStack(path: $routerPath.path) {
content()
.withEnvironments()
.withAppRouter()
.environment(routerPath)
}
}
}