mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
24 lines
636 B
Swift
24 lines
636 B
Swift
import SwiftUI
|
|
|
|
struct ManageAccountView: View {
|
|
let handleAccountDeletion: () -> Void
|
|
@State private var showDeleteAccountConfirmation = false
|
|
|
|
var body: some View {
|
|
Button(
|
|
action: {
|
|
showDeleteAccountConfirmation = true
|
|
},
|
|
label: { Text("Delete my account") }
|
|
)
|
|
.alert(isPresented: $showDeleteAccountConfirmation) {
|
|
Alert(
|
|
title: Text("Are you sure you want to delete your account? This action can't be undone."),
|
|
primaryButton: .destructive(Text("Delete Account")) {
|
|
handleAccountDeletion()
|
|
},
|
|
secondaryButton: .cancel()
|
|
)
|
|
}
|
|
}
|
|
}
|