37 lines
845 B
Swift
37 lines
845 B
Swift
|
import Martin
|
||
|
import SwiftUI
|
||
|
|
||
|
struct BaseNavigationView: View {
|
||
|
@EnvironmentObject var store: AppStore
|
||
|
|
||
|
public var body: some View {
|
||
|
Group {
|
||
|
switch store.state.currentFlow {
|
||
|
case .start:
|
||
|
switch store.state.startState.navigation {
|
||
|
case .startScreen:
|
||
|
StartScreen()
|
||
|
|
||
|
case .welcomeScreen:
|
||
|
WelcomeScreen()
|
||
|
}
|
||
|
|
||
|
case .accounts:
|
||
|
switch store.state.accountsState.navigation {
|
||
|
case .addAccount:
|
||
|
AddAccountScreen()
|
||
|
}
|
||
|
|
||
|
case .chats:
|
||
|
ChatsListScreen()
|
||
|
|
||
|
case .contacts:
|
||
|
ContactsScreen()
|
||
|
|
||
|
case .settings:
|
||
|
SettingsScreen()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|