Skip to content

Commit

Permalink
feat: add private router draft
Browse files Browse the repository at this point in the history
  • Loading branch information
SplitCode committed Oct 2, 2024
1 parent 7237444 commit e5ec029
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions frontend/src/components/PrivateRoute.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// import { useLocation, Navigate } from 'react-router-dom';

// const PrivateRoute = ({ children }) => {
// const auth = useAuth();
// const location = useLocation();

// return (
// auth.loggedIn ? children : <Navigate to="/login" state={{ from: location }} />
// );
// };

// export default PrivateRoute;

0 comments on commit e5ec029

Please sign in to comment.