Skip to content

Instantly share code, notes, and snippets.

@RomikMakavana
Created June 4, 2022 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RomikMakavana/ef86a9797d084307983e71f0d9032158 to your computer and use it in GitHub Desktop.
Save RomikMakavana/ef86a9797d084307983e71f0d9032158 to your computer and use it in GitHub Desktop.
React Auth Guard Routes AuthRoutes.js
import React from "react";
import { Route } from "react-router-dom";
import AuthGuard from "../guards/AuthGuard";
import Welcome from "../pages/Welcome";
const AuthRoutes = [
<Route key="Welcome" path="/" element={<AuthGuard component={<Welcome />} />} />
]
export default AuthRoutes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment