Skip to content

Commit 18a9c7b

Browse files
authored
Fixed crash in AcknowledgementsView (#83)
1 parent 4098b8e commit 18a9c7b

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

MyLibrary/Sources/trySwiftFeature/Acknowledgements.swift

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@ public struct Acknowledgements {
3030
public struct AcknowledgementsView: View {
3131

3232
@Bindable public var store: StoreOf<Acknowledgements>
33+
public var body: some View {
34+
List {
35+
ForEach(LicensesPlugin.licenses) { license in
36+
NavigationLink(license.name) {
37+
VStack {
38+
if let licenseText = license.licenseText {
39+
ScrollView {
40+
Text(licenseText)
41+
.padding()
42+
}
43+
} else {
44+
Text("No License Found")
45+
}
46+
}
47+
.navigationTitle(license.name)
48+
}
3349

34-
public var body: some View {
35-
List {
36-
ForEach(LicensesPlugin.licenses) { license in
37-
NavigationStack {
38-
Group {
39-
if let licenseText = license.licenseText {
40-
ScrollView {
41-
Text(licenseText)
42-
.padding()
43-
}
44-
} else {
45-
Text("No License Found")
4650
}
47-
}
48-
.navigationTitle(license.name)
4951
}
50-
}
52+
.navigationTitle(Text("Acknowledgements", bundle: .module))
5153
}
52-
.navigationTitle(Text("Acknowledgements", bundle: .module))
53-
}
5454
}
5555

5656
#Preview {

0 commit comments

Comments
 (0)