ball_admin/src/router/routers/merchant-router.tsx

45 lines
853 B
TypeScript

import { Suspense, lazy } from "react";
const Merchant = lazy(() => import("@/pages/merchants"));
const ProductType = lazy(() => import("@/pages/merchants/productType"));
const ProductUnit = lazy(() => import("@/pages/merchants/productUnit"));
const Project = lazy(() => import("@/pages/project"));
export const merchantRouter = [
{
path: "/merchant",
index: true,
element: (
<Suspense>
<Merchant />
</Suspense>
),
},
{
path: "/project",
index: true,
element: (
<Suspense>
<Project />
</Suspense>
),
},
{
path: "/productType",
index: true,
element: (
<Suspense>
<ProductType />
</Suspense>
),
},
{
path: "/productUnit",
index: true,
element: (
<Suspense>
<ProductUnit />
</Suspense>
),
},
];