IceCubes/IceCubesApp/App/TimelineTabView.swift

26 lines
482 B
Swift
Raw Normal View History

2022-11-29 11:46:02 +01:00
import SwiftUI
import Timeline
import Routeur
2022-11-29 12:18:06 +01:00
import Network
2022-11-29 11:46:02 +01:00
struct TimelineTabView: View {
let tab: String
2022-11-29 12:18:06 +01:00
private let client: Client
2022-11-29 11:46:02 +01:00
@StateObject private var routeurPath = RouterPath()
2022-11-29 12:18:06 +01:00
init(tab: String) {
self.tab = tab
self.client = .init(server: tab)
}
2022-11-29 11:46:02 +01:00
var body: some View {
NavigationStack(path: $routeurPath.path) {
2022-11-29 12:18:06 +01:00
TimelineView()
2022-11-29 11:46:02 +01:00
.withAppRouteur()
}
.environmentObject(routeurPath)
2022-11-29 12:18:06 +01:00
.environmentObject(client)
2022-11-29 11:46:02 +01:00
}
}