mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-20 00:05:26 +02:00
bugfixes
This commit is contained in:
parent
f4f8eceabe
commit
95189474a4
@ -1,5 +1,5 @@
|
||||
import {ReactElement, useState} from "react"
|
||||
import {useNavigate} from "react-router-dom"
|
||||
import {useLocation, useNavigate} from "react-router-dom"
|
||||
|
||||
import {MultiStepForm} from "~/components"
|
||||
import GenerateEmailReportsForm from "~/route-widgets/CompleteAccountRoute/GenerateEmailReportsForm"
|
||||
@ -7,9 +7,15 @@ import PasswordForm from "~/route-widgets/CompleteAccountRoute/PasswordForm"
|
||||
|
||||
export default function CompleteAccountRoute(): ReactElement {
|
||||
const navigate = useNavigate()
|
||||
const location = useLocation()
|
||||
|
||||
const [showGenerationReportForm, setShowGenerationReportForm] =
|
||||
useState(false)
|
||||
// If query `setup` is `true`, skip directly to the setup
|
||||
const [showGenerationReportForm, setShowGenerationReportForm] = useState(
|
||||
() => {
|
||||
const searchParams = new URLSearchParams(location.search)
|
||||
return searchParams.get("setup") === "true"
|
||||
},
|
||||
)
|
||||
|
||||
return (
|
||||
<MultiStepForm
|
||||
|
@ -41,7 +41,7 @@ export default function EnterDecryptionPassword(): ReactElement {
|
||||
} else {
|
||||
const nextUrl =
|
||||
new URLSearchParams(location.search).get("next") || "/"
|
||||
navigate(nextUrl)
|
||||
setTimeout(() => navigate(nextUrl), 0)
|
||||
}
|
||||
},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user