mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-11 22:24:00 +01:00
23 lines
438 B
Swift
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)
|
|
}
|
|
}
|
|
}
|