Web: Fix direct move to /wizard
This commit is contained in:
parent
f3f4037282
commit
f9a062fd67
@ -22,6 +22,17 @@ export const PublicRoute = ({ component: Component, ...rest }) => {
|
||||
);
|
||||
}
|
||||
|
||||
if (!wizardCompleted && props.location.pathname !== "/wizard") {
|
||||
return (
|
||||
<Redirect
|
||||
to={{
|
||||
pathname: "/wizard",
|
||||
state: { from: props.location },
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return <Component {...props} {...rest} />;
|
||||
};
|
||||
return <Route {...rest} render={renderComponent} />;
|
||||
|
Loading…
Reference in New Issue
Block a user