mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Use app environment to get the proper web url for forgot-password
This commit is contained in:
parent
814b766b72
commit
9c57d638ae
1 changed files with 7 additions and 1 deletions
|
|
@ -29,6 +29,7 @@ struct EmailLoginFormView: View {
|
|||
case email, password
|
||||
}
|
||||
|
||||
@EnvironmentObject var dataService: DataService
|
||||
@Environment(\.horizontalSizeClass) var horizontalSizeClass
|
||||
@Environment(\.openURL) var openURL
|
||||
@EnvironmentObject var authenticator: Authenticator
|
||||
|
|
@ -108,7 +109,12 @@ struct EmailLoginFormView: View {
|
|||
HStack {
|
||||
Button(
|
||||
action: {
|
||||
openURL(URL(string: "https://omnivore.app/auth/forgot-password")!)
|
||||
let url: URL = {
|
||||
var urlComponents = URLComponents()
|
||||
urlComponents.path = "/auth/forgot-password"
|
||||
return urlComponents.url(relativeTo: dataService.appEnvironment.webAppBaseURL)!
|
||||
}()
|
||||
openURL(url)
|
||||
},
|
||||
label: {
|
||||
Text("Forgot your password?")
|
||||
|
|
|
|||
Loading…
Reference in a new issue