Login and Home
This commit is contained in:
30
pedi-foods/Sources/PediFoods/Views/Main/MainTabView.swift
Normal file
30
pedi-foods/Sources/PediFoods/Views/Main/MainTabView.swift
Normal file
@@ -0,0 +1,30 @@
|
||||
import SwiftUI
|
||||
|
||||
struct MainTabView: View {
|
||||
@Binding var selectedTab: MainTab
|
||||
@Binding var root: RootFlow
|
||||
let tokenStore: TokenStore
|
||||
|
||||
var body: some View {
|
||||
TabView(selection: $selectedTab) {
|
||||
NavigationStack {
|
||||
HomeView()
|
||||
}
|
||||
.tabItem { Label("Home", systemImage: "house.fill") }
|
||||
.tag(MainTab.home)
|
||||
|
||||
NavigationStack {
|
||||
CartView()
|
||||
}
|
||||
.tabItem { Label("Carrinho", systemImage: "cart.fill") }
|
||||
.tag(MainTab.cart)
|
||||
|
||||
NavigationStack {
|
||||
ProfileView(root: $root, selectedTab: $selectedTab, tokenStore: tokenStore)
|
||||
}
|
||||
.tabItem { Label("Perfil", systemImage: "person.fill") }
|
||||
.tag(MainTab.profile)
|
||||
}
|
||||
.tint(AppColors.primary)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user