//
//  HomeView.swift
//  wApp
//
//  Created by Сергей Масленников on 23.08.2021.
//

import SwiftUI

struct HomeView: View {
    
    // Current Tab
    @State var currentTab = "tab1"
    
    // Hiding default TabBar
    init() {
        UITabBar.appearance().isHidden = true
    }
    
    var body: some View {
        
        TabView(selection: $currentTab) {
            TimelineView().tag("tab1")
            ReportView().tag("tab2")
            SettingsTabView().tag("tab3")
        }
        .overlay(CustomTabBarView(currentTab: $currentTab), alignment: .bottom)
        .ignoresSafeArea(edges: .bottom)
        
    }
}

struct HomeView_Previews: PreviewProvider {
    static var previews: some View {
        HomeView()
    }
}
