Created
June 4, 2022 10:23
-
-
Save RomikMakavana/48a340f2ba7fc1fcce8a8c3d0a4f6afa to your computer and use it in GitHub Desktop.
React Auth Guard Routes UnAuthRoutes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { Route } from "react-router-dom"; | |
import UnAuthGuard from "../guards/UnAuthGuard"; | |
import Login from "../pages/Login"; | |
import Register from "../pages/Register"; | |
const UnAuthRoutes = [ | |
<Route key="Login" path="/login" element={<UnAuthGuard component={<Login />} />} ></Route>, | |
<Route key="Register" path="/register" element={<UnAuthGuard component={<Register />} />} > </Route> | |
] | |
export default UnAuthRoutes; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment