From 1bc31e4d8c8d23230bdac1b2bd73e76c8d455222 Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Wed, 31 Jul 2024 12:37:38 +0530 Subject: update --- panel/src/components/PrivateRoute.jsx | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'panel/src/components') diff --git a/panel/src/components/PrivateRoute.jsx b/panel/src/components/PrivateRoute.jsx index 04e00f7..2160f74 100644 --- a/panel/src/components/PrivateRoute.jsx +++ b/panel/src/components/PrivateRoute.jsx @@ -1,10 +1,17 @@ -import React from 'react'; -import { Navigate, Outlet } from 'react-router-dom'; -import { useAuth } from '../contexts/AuthContext'; +import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; +import LoginPage from '../pages/LoginPage'; +import Dashboard from '../pages/Dashboard'; // Assuming you have a Dashboard component -const PrivateRoute = () => { - const { currentUser } = useAuth(); - return currentUser ? : ; -}; +function App() { + return ( + + + } /> + } /> + {/* Other routes */} + + + ); +} -export default PrivateRoute; +export default App; -- cgit v1.2.3-59-g8ed1b