39 lines
1.1 KiB
Swift
39 lines
1.1 KiB
Swift
//
|
||
// MainView.swift
|
||
// VolnahubApp
|
||
//
|
||
// Created by cheykrym on 09/06/2025.
|
||
//
|
||
|
||
import SwiftUI
|
||
|
||
struct MainView: View {
|
||
@ObservedObject var viewModel: LoginViewModel
|
||
@State private var selectedTab: Int = 1 // Начинаем с Чатов (индекс 1)
|
||
|
||
var body: some View {
|
||
TabView(selection: $selectedTab) {
|
||
ContactsTab()
|
||
.tabItem {
|
||
Image(systemName: "person.2.fill")
|
||
Text(NSLocalizedString("MainView_contacts", comment: ""))
|
||
}
|
||
.tag(0)
|
||
|
||
ChatsTab()
|
||
.tabItem {
|
||
Image(systemName: "bubble.left.and.bubble.right.fill")
|
||
Text(NSLocalizedString("MainView_chats", comment: ""))
|
||
}
|
||
.tag(1)
|
||
|
||
SettingsTab(viewModel: viewModel)
|
||
.tabItem {
|
||
Image(systemName: "gearshape.fill")
|
||
Text(NSLocalizedString("MainView_settings", comment: ""))
|
||
}
|
||
.tag(2)
|
||
}
|
||
}
|
||
}
|