refactor: avoid repetition of the protected routes component

This commit is contained in:
Caio Cabral committed 2024-12-12 08:24:10 -05:00
1 parent 66dc6dbc1a
commit a70e96f1f3
3 files changed
+26 -32

No files matched your search

@@ -15,7 +15,7 @@ import PropTypes from "prop-types";
const ProtectedRoute = ({ Component, ...rest }) => {
const authState = useSelector((state) => state.auth);
console.log("Protected");
return authState.authToken ? (
<Component {...rest} />
) : (