Files
sure/bitrig/App/SureMainTabView.swift
T
0aa43de10a Add experimental Swift-native Sure Insights app (#3134)
* Add Swift-native Sure app

* Fix push subscriptions schema for CI

* Address native app review feedback

* Address remaining native app review feedback

* Use Flutter app logo for native icon

* Honor insight notification preferences and locale

---------

Co-authored-by: Juan Jose Mata <2v8shcb6pz@privaterelay.appleid.com>
Co-authored-by: sure-admin <sure-admin@splashblot.com>
2026-08-25 04:16:24 +02:00

30 lines
850 B
Swift

import SwiftUI
struct SureMainTabView: View {
@Environment(SureStore.self) private var store
var body: some View {
@Bindable var store = store
TabView(selection: $store.selectedTab) {
SureOverviewView()
.tabItem { Label("Overview", systemImage: "square.grid.2x2.fill") }
.tag(SureTab.overview)
SureAccountsView()
.tabItem { Label("Accounts", systemImage: "building.columns.fill") }
.tag(SureTab.accounts)
SureBudgetsView()
.tabItem { Label("Budgets", systemImage: "chart.pie.fill") }
.tag(SureTab.budgets)
SureAssistantView()
.tabItem { Label("Assistant", systemImage: "sparkles") }
.tag(SureTab.assistant)
}
.onReceive(NotificationCenter.default.publisher(for: .sureOpenInsights)) { _ in
store.selectedTab = .overview
}
}
}