⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Cannot convert value of type 'CustomAlertView' to closure result type 'Alert' #1

@NemSothea

Description

@NemSothea

I follow your step but I got error!!

VStack {
Button("LOIGIN") {
loginVm.login()
showAlert = true
}
.alert(isPresented: $showAlert) {

                                CustomAlertView(///Cannot convert value of type 'CustomAlertView' to closure result type 'Alert'
                                    message: "An error occurred.",
                                    primaryButtonLabel: "OK",
                                    primaryButtonAction: {},
                                    secondaryButtonLabel: nil,
                                    secondaryButtonAction: nil,
                                    image: Image(systemName: "exclamationmark.triangle")
                                )
                                
                            }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions