import { lazy, Suspense } from "react"; import { Switch, Route, Router as WouterRouter } from "wouter"; import { Layout } from "@/components/Layout"; import { PlatformProvider } from "@/lib/platform"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import LinearProgress from "@mui/material/LinearProgress"; import { ErrorBoundary } from "@/components/ErrorBoundary"; const Home = lazy(() => import("@/pages/home")); const ProductsPage = lazy(() => import("@/pages/ProductsPage")); const ProductPage = lazy(() => import("@/pages/ProductPage")); const AboutPage = lazy(() => import("@/pages/AboutPage")); const ContactPage = lazy(() => import("@/pages/ContactPage")); const WorkspacePage = lazy(() => import("@/pages/WorkspacePage")); const ConnectionPage = lazy(() => import("@/pages/ConnectionPage")); const AddressesPage = lazy(() => import("@/pages/AddressesPage")); const CartPage = lazy(() => import("@/pages/CartPage")); const OrdersPage = lazy(() => import("@/pages/OrdersPage")); const AccessPage = lazy(() => import("@/pages/AccessPage")); const RolesPage = lazy(() => import("@/pages/AccessPage").then((module) => ({ default: module.RolesPage, })), ); const AuditPage = lazy(() => import("@/pages/AccessPage").then((module) => ({ default: module.AuditPage, })), ); const CatalogAdminPage = lazy(() => import("@/pages/CatalogAdminPage")); const InventoryPage = lazy(() => import("@/pages/InventoryPage")); const MaterialStockPage = lazy(() => import("@/pages/MaterialStockPage")); const BusinessAccountsPage = lazy(() => import("@/pages/BusinessAccountsPage")); const PriceListsPage = lazy(() => import("@/pages/PriceListsPage")); const QuotesPage = lazy(() => import("@/pages/QuotesPage")); const CreditPoliciesPage = lazy(() => import("@/pages/CreditPoliciesPage")); const SamplesPage = lazy(() => import("@/pages/SamplesPage")); const MaterialCostRatesPage = lazy(() => import("@/pages/MaterialCostRatesPage")); const ProcurementPage = lazy(() => import("@/pages/ProcurementPage")); const BomPage = lazy(() => import("@/pages/BomPage")); const ProductionBatchesPage = lazy(() => import("@/pages/ProductionBatchesPage")); const SupplierDocumentsPage = lazy(() => import("@/pages/SupplierDocumentsPage")); const PurchaseOrdersPage = lazy(() => import("@/pages/ProcurementPage").then((module) => ({ default: module.PurchaseOrdersPage })), ); const OffersPage = lazy(() => import("@/pages/OffersPage")); const RecoveryPage = lazy(() => import("@/pages/RecoveryPage")); const NotFound = lazy(() => import("@/pages/not-found")); const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } }, }); function Router() { return ( }> {(params) => } {() => } {(params) => } {() => } {(params) => } {() => } {() => } {(params) => } {() => } {(params) => } {(params) => } {() => } {() => } {(params) => } {(params) => } {(params) => } {() => } {() => } {(params) => } {(params) => } {(params) => } {() => } {() => } {(params) => } {(params) => } {(params) => } {() => } {(params) => } {() => } {() => } {() => } {(params) => } {(params) => } {() => } {(params) => } {(params) => } {() => } {() => } {() => } {(params) => } {() => } {(params) => } {() => } {(params) => } {() => } {(params) => } {() => } {() => } {(params) => } {(params) => } {() => } {(params) => } {() => } {() => } {() => } ); } export default function App() { return ( ); }