From d95051ad823f0b57a6fba8fa686f704c56fd788b Mon Sep 17 00:00:00 2001 From: Ian Krieger <48930920+IanKrieger@users.noreply.github.com> Date: Tue, 5 Dec 2023 10:36:45 -0500 Subject: [PATCH] fix: make sure navigation on form is consistent (#988) --- src/auth/registration/Register.tsx | 4 +--- src/components/Route/RouteSelectionButton.tsx | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/auth/registration/Register.tsx b/src/auth/registration/Register.tsx index c24771b1..149db7bd 100644 --- a/src/auth/registration/Register.tsx +++ b/src/auth/registration/Register.tsx @@ -45,7 +45,6 @@ export function Register() { const activeStep = useRef(0); activeStep.current = steps.findIndex((s) => { - console.log(params.get("pos")); return s.pos === (params.get("pos") ?? "choice"); }); @@ -60,7 +59,6 @@ export function Register() { } const currentStep = activeStep.current; - console.log(currentStep); return ( @@ -106,7 +104,7 @@ export function Register() { activeStep={currentStep} steps={steps.length - 1} onNext={() => { - if (values.setup === "managed") { + if (currentStep === 0 && values.setup === "managed") { history.replace("/contact"); } else { const step = (activeStep.current = currentStep + 1); diff --git a/src/components/Route/RouteSelectionButton.tsx b/src/components/Route/RouteSelectionButton.tsx index d9003a72..a526e653 100644 --- a/src/components/Route/RouteSelectionButton.tsx +++ b/src/components/Route/RouteSelectionButton.tsx @@ -7,7 +7,6 @@ interface Params { export function RouteSelectionButton({ routes }: Params) { const history = useHistory(); - console.log(history.location.pathname); return (