d6e29a74af
- Added TanStack Router for improved routing management. - Created route tree and individual routes for login, index, add-product, inventory, and view-product. - Implemented authentication checks for the inventory route. - Introduced a landing page component. - Updated App component to utilize RouterProvider and ToastContainer for notifications. - Refactored CSS to use Tailwind CSS, removing custom styles. - Added API configuration for backend URL management. - Implemented authentication utilities for user sign-in and sign-out. - Integrated i18next for internationalization with English and German language support. - Created localization files for English and German languages.
35 lines
724 B
TypeScript
35 lines
724 B
TypeScript
import { createRouter, RouterProvider } from "@tanstack/react-router";
|
|
import "./App.css";
|
|
import { ToastContainer } from "react-toastify";
|
|
import { routeTree } from "./routeTree.gen";
|
|
|
|
const router = createRouter({ routeTree });
|
|
|
|
declare module "@tanstack/react-router" {
|
|
interface Register {
|
|
router: typeof router;
|
|
}
|
|
}
|
|
|
|
function App() {
|
|
return (
|
|
<>
|
|
<ToastContainer
|
|
position="top-right"
|
|
autoClose={5000}
|
|
hideProgressBar={false}
|
|
newestOnTop={false}
|
|
closeOnClick={false}
|
|
rtl={false}
|
|
pauseOnFocusLoss
|
|
draggable
|
|
pauseOnHover
|
|
theme="colored"
|
|
/>
|
|
<RouterProvider router={router} />
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default App;
|