import React, { useContext } from 'react'; import { BrowserRouter as Router, Route, Routes, Navigate } from 'react-router-dom'; import { Layout } from 'antd'; import LoginPage from './components/Auth/LoginPage'; import AdminDashboard from './components/admin/AdminDashboard'; import EmployeeDashboard from './components/employee/EmployeeDashboard'; import CustomerList from './components/customer/CustomerList'; import AddCustomer from './components/customer/AddCustomer'; import Sidebar from './components/sidebar/Sidebar'; import CustomerMeasurements from './components/customer/CustomerMeasurements'; import { AuthProvider, AuthContext } from './contexts/AuthContext'; const { Content } = Layout; const App = () => { const { user } = { name: 'Suraj' }; // useContext(AuthContext); return (
} /> } /> {/* Add HomePage route */} } /> } /> } /> } /> } /> } />
); }; const PrivateRoute = ({ children }) => { // const { user } = useContext(AuthContext); // if (!user) { // return ; // } return children; }; export default App;