refactor: use Wizard component on first route
This commit is contained in:
parent
f8a82bb84b
commit
61285c9037
3 changed files with 28 additions and 39 deletions
|
|
@ -37,12 +37,9 @@ const Wizard = () => {
|
|||
|
||||
const wizardStep = getWizardStep(data?.config, data?.cryptoCurrencies)
|
||||
|
||||
const shouldGoBack =
|
||||
history.length && !history.location.state?.fromAuthRegister
|
||||
|
||||
if (wizardStep === 0) {
|
||||
setWizardTested(true)
|
||||
shouldGoBack ? history.goBack() : history.push('/')
|
||||
return <></>
|
||||
}
|
||||
|
||||
const isWelcome = step === 0
|
||||
|
|
@ -54,7 +51,9 @@ const Wizard = () => {
|
|||
const doContinue = () => {
|
||||
if (step >= STEPS.length - 1) {
|
||||
setOpen(false)
|
||||
setWizardTested(true)
|
||||
history.push('/')
|
||||
return
|
||||
}
|
||||
|
||||
const nextStep = step === 0 && wizardStep ? wizardStep : step + 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue