- Updated project setup to use Vite for React application. - Removed unnecessary files and simplified configurations. - Enhanced authentication and routing in the application. - Improved code quality with ESLint and updated styles. - Added new components for better user experience, including a password recovery modal. - Updated documentation for clearer setup instructions.
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
// App.tsx or main routing component
|
|
//import React from 'react';
|
|
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
|
|
import Layout from '@/components/layouts/Layout';
|
|
import LayoutLogin from '@/components/layouts/LayoutLogin';
|
|
import Vehicles from '@/components/pages/Vehicles';
|
|
import Login from '@/components/pages/Login';
|
|
|
|
const App = () => {
|
|
return (
|
|
<Router basename="/">
|
|
<Routes>
|
|
<Route path="/" element={<Navigate to="/login" replace />} />
|
|
<Route
|
|
path="/vehicles"
|
|
element={
|
|
<Layout>
|
|
<Vehicles />
|
|
</Layout>
|
|
}
|
|
/>
|
|
<Route
|
|
path="/login"
|
|
element={
|
|
<LayoutLogin>
|
|
<Login />
|
|
</LayoutLogin>
|
|
}
|
|
/>
|
|
</Routes>
|
|
</Router>
|
|
);
|
|
};
|
|
|
|
export default App;
|