Showing each bank now in a section of its own
This commit is contained in:
parent
e95dfee564
commit
360c49a08b
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue