40 lines
915 B
Swift
40 lines
915 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()
|
|
|
|
case .conversation:
|
|
ConversationScreen()
|
|
}
|
|
}
|
|
}
|
|
}
|