Skip to content

Instantly share code, notes, and snippets.

@srstanic
Created June 28, 2025 17:18
Show Gist options
  • Select an option

  • Save srstanic/431d0cb5d76adaa386ff1d2509718bd6 to your computer and use it in GitHub Desktop.

Select an option

Save srstanic/431d0cb5d76adaa386ff1d2509718bd6 to your computer and use it in GitHub Desktop.
enum LoadableContentState<LoadedContentType, ErrorContentType> {
case loading
case loaded(content: LoadedContentType)
case error(content: ErrorContentType)
}
// error content for the transactions list screen
struct TransactionsListLoadingErrorContent {
let title: String
let subtitle: String
let imageName: String
let buttonTitle: String
}
// error content for the account balance cell in the dashboard screen
struct AccountBalanceCellErrorContent {
let message: String
let buttonTitle: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment