const appMenu = [
  {
    path: '/',
    routes: [
      { path: '/', redirect: '/login' },
      {
        component: '404',
      },
    ],
  },
];
const adminMenu = [
  {
    path: '/',
    routes: [
      { path: '/', redirect: '/login' },
      {
        component: '404',
      },
    ],
  },
];
function generateMenu(key: string, menu: any) {
  return menu.map((item: any) => {
    item.access = key;
    if(item.access)
    return item;
  });
}
export default {
  appMenu: generateMenu('appMenu', appMenu),
  adminMenu: generateMenu('adminMenu', adminMenu),
};
