From cf39c673da5a2785943109de5c9172d5c607a5ea Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 11 Apr 2024 23:07:32 -0400 Subject: feat: Implement React context for authorization --- src/App.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/App.js') diff --git a/src/App.js b/src/App.js index 069ae93..678f26f 100644 --- a/src/App.js +++ b/src/App.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState } from 'react'; import { BrowserRouter as Router, Routes, Route, useLocation } from 'react-router-dom'; import Navbar from './components/Navbar'; import Footer from './components/Footer'; @@ -13,14 +13,17 @@ import Careers from "./pages/Careers"; import HelpCenter from "./pages/HelpCenter"; import TermsOfService from "./pages/TermsOfService"; import PrivacyPolicy from "./pages/PrivacyPolicy"; +import Dashboard from "./pages/Dashboard"; +import {AuthProvider} from "./providers/AuthContext"; function App() { const location = useLocation(); const excludedRoutes = ['/login', '/sign-up', '/forgot-password']; return ( +
- {!excludedRoutes.includes(location.pathname) && } + {!excludedRoutes.includes(location.pathname) && } } /> } /> @@ -30,12 +33,14 @@ function App() { } /> } /> } /> + } /> } /> } /> {!excludedRoutes.includes(location.pathname) &&
+
); } -- cgit v1.2.3-70-g09d2