Files
omnivore/apple/OmnivoreKit/Sources/App/Views/DeleteAccountView.swift
2023-12-20 14:35:59 +08:00

25 lines
614 B
Swift

import Models
import Services
import SwiftUI
import Utils
import Views
struct DeleteAccountView: View {
@EnvironmentObject var dataService: DataService
@EnvironmentObject var authenticator: Authenticator
public var body: some View {
VStack(alignment: .center) {
Text("Deleting account...")
ProgressView()
.frame(maxWidth: .infinity)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.task {
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(300)) {
authenticator.logout(dataService: dataService, isAccountDeletion: true)
}
}
}
}