I am totally new to the react router.
I have this route
<PrivateRoute exact path="/quiz-setup/:job" component={QuizSetupMain} />
where I set a param as a job. So I do in action like this
history.push({
pathname: '/quiz-setup',
search: this.props.selectedJdName
})
My PrivateRoute ->
return hasUserLogIn ?
(
<Route
{...rest}
path={path}
component={Component}
/>
)
:
(
<Redirect
to={{
pathname: "/login",
state: { from: path }
}}
/>
)
};
But now, it is not matching that route. So How can I do this?