first commit

This commit is contained in:
Olu Amey
2023-01-16 13:09:45 -05:00
commit a6ebce376c
271 changed files with 39454 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
import { Navigate, Outlet } from "react-router-dom";
const AuthRoute = ({ redirectPath = "/login", children }) => {
const isLogin = localStorage.getItem("email");
if (!isLogin) {
return <Navigate to={redirectPath} replace />;
}
return children || <Outlet />;
};
export default AuthRoute;