added login page and started integrated of security
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
|
||||
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
||||
|
||||
import ResponsiveAppBar from './components/ResponsiveAppBar';
|
||||
import ShipmentView from './pages/ShipmentView';
|
||||
import HomePage from './pages/HomeView';
|
||||
@ -8,6 +9,8 @@ import PlanningView from './pages/PlanningView';
|
||||
import Modal from './components/Modal';
|
||||
import AddressManager from './pages/AddressManagerView';
|
||||
import ContactsManager from './pages/ContactsManagerView';
|
||||
import LoginView from './pages/LoginView';
|
||||
import ProtectedRoute from './components/ProtectedRoute';
|
||||
|
||||
const App: React.FC = () => {
|
||||
const [openAddressManager, setOpenAddressManager] = useState(false);
|
||||
@ -36,10 +39,11 @@ const App: React.FC = () => {
|
||||
onOpenContactsManager={handleOpenContactsManager}
|
||||
/>
|
||||
<Routes>
|
||||
<Route path="/" element={<HomePage />} />
|
||||
<Route path="/shipments" element={<ShipmentView />} />
|
||||
<Route path="/planning" element={<PlanningView />} />
|
||||
<Route path="/results" element={<ResultsView />} />
|
||||
<Route path="/login" element={<LoginView />} />
|
||||
<Route path="/" element={<ProtectedRoute element={<HomePage />} />} />
|
||||
<Route path="/shipments" element={<ProtectedRoute element={<ShipmentView />} />} />
|
||||
<Route path="/planning" element={<ProtectedRoute element={<PlanningView />} />} />
|
||||
<Route path="/results" element={<ProtectedRoute element={<ResultsView />} />} />
|
||||
{/* Other routes as necessary */}
|
||||
</Routes>
|
||||
<Modal open={openAddressManager} onClose={handleCloseAddressManager} title="Address Management">
|
||||
|
Reference in New Issue
Block a user