Skip to content

Commit a690937

Browse files
authored
Fix Alert Case Study (#860)
1 parent b5719bf commit a690937

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-AlertsAndConfirmationDialogs.swift

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,20 @@ struct AlertAndConfirmationDialogView: View {
9191
Form {
9292
Section(header: Text(template: readMe, .caption)) {
9393
Text("Count: \(viewStore.count)")
94-
9594
Button("Alert") { viewStore.send(.alertButtonTapped) }
96-
.alert(
97-
self.store.scope(state: \.alert),
98-
dismiss: .alertDismissed
99-
)
100-
10195
Button("Confirmation Dialog") { viewStore.send(.confirmationDialogButtonTapped) }
102-
.confirmationDialog(
103-
self.store.scope(state: \.confirmationDialog),
104-
dismiss: .confirmationDialogDismissed
105-
)
10696
}
10797
}
10898
}
10999
.navigationBarTitle("Alerts & Confirmation Dialogs")
100+
.alert(
101+
self.store.scope(state: \.alert),
102+
dismiss: .alertDismissed
103+
)
104+
.confirmationDialog(
105+
self.store.scope(state: \.confirmationDialog),
106+
dismiss: .confirmationDialogDismissed
107+
)
110108
}
111109
}
112110

0 commit comments

Comments
 (0)