routes.ts 1.16 KB
Newer Older
1
import Loadable from 'utilities/CustomReactLoadable';
2 3 4 5


const publicRoutes = [
  {
6
    path: '/wiews/:wiewsCode([a-zA-Z]+[0-9]+)',
7
    component: Loadable({
8
      loader: () => import(/* webpackMode:"lazy", webpackChunkName: "institutes" */'institutes/ui/DisplayPage'),
9
    }),
10 11 12
    exact: true,
  },
  {
13
    path: '/wiews/:filterCode(v.+)?',
14
    component: Loadable({
15
      loader: () => import(/* webpackMode:"lazy", webpackChunkName: "institutes" */'institutes/ui/BrowsePage'),
16
    }),
17 18 19 20 21
    exact: true,
  },
];

const dashboardRoutes = [
22 23 24 25 26 27 28
  {
    path: ':root(/wiews/[a-zA-Z]+[0-9]+/)files/:path(.*)',
    component: Loadable({
      loader: () => import(/* webpackMode:"lazy", webpackChunkName: "repository" */'institutes/ui/RepositoryPage'),
    }),
    exact: true,
    extraProps: {
Oleksii Savran's avatar
Oleksii Savran committed
29
      title: 'institutes.dashboard.p.repository.title',
30 31
    },
  },
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
32 33
  {
    path: '/wiews/:wiewsCode([a-zA-Z]+[0-9]+)/edit',
34 35 36
    component: Loadable({
      loader: () => import(/* webpackMode:"lazy", webpackChunkName: "institutes" */'institutes/ui/dashboard/EditPage'),
    }),
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
37 38
    exact: true,
  },
39 40
];

Matija Obreza's avatar
Matija Obreza committed
41
export { publicRoutes as institutePublicRoutes, dashboardRoutes as instituteDashboardRoutes };
42