Skip to content

Commit

Permalink
Update ErrorableViewProtocol.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
devmehmetates committed Aug 27, 2023
1 parent c914dac commit e9e998c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Sources/ErrorableView/ErrorableViewProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public extension ErrorableViewProtocol where Content == AnyView {
) -> Content {
switch viewModel.state {
case .loading:
loadingView()
return loadingView()
case .successful:
successfulView()
return successfulView()
case .failure:
failureView()
return failureView()
}
}

Expand All @@ -40,11 +40,11 @@ public extension ErrorableViewProtocol where Content == AnyView {
) -> Content {
switch viewModel.state {
case .loading:
loadingState
return loadingState
case .successful:
successfulView()
return successfulView()
case .failure:
failureView()
return failureView()
}
}

Expand All @@ -58,11 +58,11 @@ public extension ErrorableViewProtocol where Content == AnyView {
) -> Content {
switch viewModel.state {
case .loading:
loadingState
return loadingState
case .successful:
successfulView()
return successfulView()
case .failure:
failuteState(errorTitle: errorTitle, errorSubTitle: errorSubTitle, errorIcon: errorIcon, errorSystemIcon: errorSystemIcon, errorButtonTitle: errorButtonTitle)
return failuteState(errorTitle: errorTitle, errorSubTitle: errorSubTitle, errorIcon: errorIcon, errorSystemIcon: errorSystemIcon, errorButtonTitle: errorButtonTitle)
}
}

Expand Down

0 comments on commit e9e998c

Please sign in to comment.