tabbar
This commit is contained in:
@@ -7,11 +7,57 @@ struct ContentView: View {
|
||||
@State var appState = AppState()
|
||||
|
||||
var body: some View {
|
||||
switch root {
|
||||
case .auth:
|
||||
AuthFlowView(root: $root, selectedTab: $selectedTab, tokenStore: tokenStore, appState: $appState)
|
||||
case .main:
|
||||
MainTabView(selectedTab: $selectedTab, root: $root, tokenStore: tokenStore, appState: $appState)
|
||||
Group {
|
||||
switch root {
|
||||
case .auth:
|
||||
AuthFlowView(root: $root, selectedTab: $selectedTab, tokenStore: tokenStore, appState: $appState)
|
||||
case .main:
|
||||
MainTabView(selectedTab: $selectedTab, root: $root, tokenStore: tokenStore, appState: $appState)
|
||||
}
|
||||
}
|
||||
.sheet(item: $appState.activeModal) { modal in
|
||||
switch modal {
|
||||
case .addressPicker:
|
||||
AddressPickerModalView()
|
||||
case .filters:
|
||||
FiltersModalView()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct AddressPickerModalView: View {
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
VStack(spacing: 12) {
|
||||
Text("Selecionar endereco")
|
||||
.font(AppTypography.heading2)
|
||||
Text("Fluxo de endereco sera implementado na etapa de checkout/perfil.")
|
||||
.font(AppTypography.body)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundStyle(AppColors.textMuted)
|
||||
}
|
||||
.padding(24)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(AppColors.backgroundLight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct FiltersModalView: View {
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
VStack(spacing: 12) {
|
||||
Text("Filtros")
|
||||
.font(AppTypography.heading2)
|
||||
Text("Filtros de busca serao ligados na integracao real da Home com API.")
|
||||
.font(AppTypography.body)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundStyle(AppColors.textMuted)
|
||||
}
|
||||
.padding(24)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(AppColors.backgroundLight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user