Fix import remote profile
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
import SwiftUI
|
||||
|
||||
func NavigationDestinationCompat(isPresented: Binding<Bool>, @ViewBuilder destination: () -> some View) -> some View {
|
||||
if #unavailable(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0) {
|
||||
return NavigationLink(
|
||||
destination: destination(),
|
||||
isActive: isPresented,
|
||||
label: {
|
||||
EmptyView()
|
||||
}
|
||||
)
|
||||
} else {
|
||||
return EmptyView().navigationDestination(isPresented: isPresented, destination: destination)
|
||||
}
|
||||
NavigationLink(
|
||||
destination: destination(),
|
||||
isActive: isPresented,
|
||||
label: {
|
||||
EmptyView()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -70,6 +70,11 @@ public struct EditProfileView: View {
|
||||
Text("Share")
|
||||
}
|
||||
#endif
|
||||
ShareButtonCompat($alert) {
|
||||
Text("Share URL")
|
||||
} itemURL: {
|
||||
profile.shareLink
|
||||
}
|
||||
Button("Update") {
|
||||
isLoading = true
|
||||
Task.detached {
|
||||
@@ -77,10 +82,10 @@ public struct EditProfileView: View {
|
||||
}
|
||||
}
|
||||
.disabled(isLoading)
|
||||
Button("Delete", role: .destructive) {
|
||||
Task.detached {
|
||||
await deleteProfile()
|
||||
}
|
||||
}
|
||||
Button("Delete", role: .destructive) {
|
||||
Task.detached {
|
||||
await deleteProfile()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user