Skip to content
Snippets Groups Projects
Select Git revision
  • 9bddbf380405287aaedeb38001d471478f6e8abd
  • main default protected
  • development
  • integration
  • v1.1.5
  • v1.1.4
  • v1.1.3
  • v1.1.2
  • v1.1.1
  • v1.1.0
  • v1.0.0
11 results

GetSingleUseParams.swift

Blame
  • Alerts.swift 721 B
    import ComposableArchitecture
    
    extension AlertState {
      public static func confirmAccountDeletion() -> AlertState<HomeComponent.Action> {
        AlertState<HomeComponent.Action>(
          title: TextState("Delete Account"),
          message: TextState("This will permanently delete your account and can't be undone."),
          buttons: [
            .destructive(TextState("Delete"), action: .send(.deleteAccount(.confirmed))),
            .cancel(TextState("Cancel"))
          ]
        )
      }
    
      public static func accountDeletionFailed(_ error: Error) -> AlertState<HomeComponent.Action> {
        AlertState<HomeComponent.Action>(
          title: TextState("Error"),
          message: TextState(error.localizedDescription),
          buttons: []
        )
      }
    }