Issue #511
struct CountriesView: View {
let groups: [Group]
init(countries: [Country]) {
self.groups = CountryManager.shared.groups(countries: countries)
}
var body: some View {
List {
ForEach(groups) { group in
Section(
header:
Text(group.initial)
.foregroundColor(Color.yellow)
.styleTitle(),
content: {
ForEach(group.countries) { country in
CountryRow(country: country)
}
}
)
}
}
}
}