Project 'elixxir/elixxir-dapps-sdk-swift' was moved to 'mobile/ios/elixxir-dapps-sdk-swift'. Please update any links and bookmarks that may still have the old path.
Select Git revision
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: []
)
}
}