react reroute site code example
Example: redirect react router
<Route exact path="/">
{loggedIn ? <Redirect to="/profile" /> : <HomePage />}
</Route>
<Route exact path="/">
{loggedIn ? <Redirect to="/profile" /> : <HomePage />}
</Route>