Showing each bank now in a section of its own

This commit is contained in:
dankito 2020-07-19 21:37:30 +02:00
parent e95dfee564
commit 360c49a08b
1 changed files with 10 additions and 3 deletions

View File

@ -13,15 +13,22 @@ struct AccountsTab: View {
NavigationView { NavigationView {
VStack { VStack {
if data.banks.isEmpty == false { if data.banks.isEmpty == false {
List(data.banks, id: \.id) { bank in Form {
BankListItem(bank: bank) ForEach(0 ..< data.banks.count) { bankIndex in
Section {
BankListItem(bank: self.data.banks[bankIndex])
}
}
} }
} }
Spacer()
NavigationLink(destination: AddAccountDialog()) { NavigationLink(destination: AddAccountDialog()) {
Text("Add account") Text("Add account")
} }
.padding()
Spacer()
} }
.navigationBarHidden(true) .navigationBarHidden(true)
.navigationBarTitle(Text("Accounts"), displayMode: .inline) .navigationBarTitle(Text("Accounts"), displayMode: .inline)