feat: savings tab, fix pull-to-refresh, beautiful modals, fix signing
This commit is contained in:
@@ -48,13 +48,16 @@ struct FinanceView: View {
|
||||
}
|
||||
.sheet(isPresented: $showAddTransaction) {
|
||||
AddTransactionView(isPresented: $showAddTransaction, categories: categories) { await loadData() }
|
||||
.presentationDetents([.medium, .large])
|
||||
.presentationDragIndicator(.visible)
|
||||
.presentationBackground(Color(hex: "0a0a1a"))
|
||||
}
|
||||
.task { await loadData() }
|
||||
.refreshable { await loadData() }
|
||||
.refreshable { await loadData(refresh: true) }
|
||||
}
|
||||
|
||||
func loadData() async {
|
||||
isLoading = true
|
||||
func loadData(refresh: Bool = false) async {
|
||||
if !refresh { isLoading = true }
|
||||
async let s = APIService.shared.getFinanceSummary(token: authManager.token)
|
||||
async let t = APIService.shared.getTransactions(token: authManager.token)
|
||||
async let c = APIService.shared.getFinanceCategories(token: authManager.token)
|
||||
|
||||
Reference in New Issue
Block a user