Skip to content

Commit

Permalink
UPDATE: For deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
GGalina committed May 15, 2024
1 parent f66cba8 commit a71ca7c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/PrivateRoute.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ import { selectorIsLoggedIn } from 'Redux/Auth/authSelectors';
export const PrivateRoute = ({ component: Component, redirectTo = '/' }) => {
const isLoggedIn = useSelector(selectorIsLoggedIn);
return !isLoggedIn ? <Navigate to={redirectTo} /> : Component;
};
};




///hello try again

0 comments on commit a71ca7c

Please sign in to comment.