IceCubes/IceCubesApp/App/AppRouteur.swift

21 lines
502 B
Swift
Raw Normal View History

2022-11-29 11:46:02 +01:00
import SwiftUI
import Timeline
import Account
import Routeur
2022-12-18 20:30:19 +01:00
import Status
2022-11-29 11:46:02 +01:00
extension View {
func withAppRouteur() -> some View {
self.navigationDestination(for: RouteurDestinations.self) { destination in
switch destination {
case let .accountDetail(id):
2022-11-29 12:18:06 +01:00
AccountDetailView(accountId: id)
2022-12-17 13:37:46 +01:00
case let .accountDetailWithAccount(account):
AccountDetailView(account: account)
2022-11-29 11:46:02 +01:00
case let .statusDetail(id):
StatusDetailView(statusId: id)
}
}
}
}