Skip to content
Snippets Groups Projects
Commit 618eae31 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Show failure in ContactLookupView

parent f7f7def9
No related branches found
No related tags found
2 merge requests!112Restore contacts from backup,!102Release 1.0.0
...@@ -13,10 +13,12 @@ public struct ContactLookupView: View { ...@@ -13,10 +13,12 @@ public struct ContactLookupView: View {
init(state: ContactLookupState) { init(state: ContactLookupState) {
id = state.id id = state.id
isLookingUp = state.isLookingUp isLookingUp = state.isLookingUp
failure = state.failure
} }
var id: Data var id: Data
var isLookingUp: Bool var isLookingUp: Bool
var failure: String?
} }
public var body: some View { public var body: some View {
...@@ -43,6 +45,14 @@ public struct ContactLookupView: View { ...@@ -43,6 +45,14 @@ public struct ContactLookupView: View {
} header: { } header: {
Text("Contact ID") Text("Contact ID")
} }
if let failure = viewStore.failure {
Section {
Text(failure)
} header: {
Text("Error")
}
}
} }
.navigationTitle("Lookup") .navigationTitle("Lookup")
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment