Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Commit 201686a

Browse files
committed
Render title
1 parent 59b94bf commit 201686a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

samples/discovery/ios/ios/plans/PlansScreenViewModel.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ class PlansScreenViewModel: ObservableObject {
2222
func fetchComponentBox() {
2323
Task {
2424
do {
25-
let response = try await asyncResult(for: client.fetchScreenNative(url: "https://api.componentbox.io/screens/1.json"))
26-
27-
guard case let .success(val) = response else {
28-
return
29-
}
30-
screen = val
25+
let response = try await asyncResult(for: client.fetchScreenNative(url: "https://api.componentbox.io/screens/1.json"))
3126

27+
guard case let .success(screen) = response else { return }
28+
self.screen = screen
3229

3330
} catch {
3431
print("FAILED \(error)")

0 commit comments

Comments
 (0)