
import {Suspense,lazy} from 'react';
import Layout from '../page/layout';
const HomeView = lazy(() => import('@/views/HomeView'));
const AboutView = lazy(() => import('@/views/AboutView'));
const Loading = ()=>(<div>loading...</div>);
export const routerMenu = [
  {
    path: '/', 
    element: <Layout/>, 
    children:[
      {
        path: '/home', 
        element: (
          <Suspense fallback={<Loading />}>
            <HomeView />
          </Suspense>
        ), 
      },
      {
        path: '/about', 
        element: (
          <Suspense fallback={<Loading />}>
            <AboutView />
          </Suspense>
        ), 
      }
    ]
  }
   
]