forked from finos/git-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.tsx
More file actions
110 lines (99 loc) · 3.17 KB
/
routes.tsx
File metadata and controls
110 lines (99 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* !
=========================================================
* Material Dashboard React - v1.9.0
=========================================================
* Product Page: https://www.creative-tim.com/product/material-dashboard-react
* Copyright 2020 Creative Tim (https://www.creative-tim.com)
* Licensed under MIT (https://github.com/creativetimofficial/material-dashboard-react/blob/master/LICENSE.md)
* Coded by Creative Tim
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
import React from 'react';
import RouteGuard from './ui/components/RouteGuard/RouteGuard';
import Person from '@material-ui/icons/Person';
import PushRequests from './ui/views/PushRequests/PushRequests';
import PushDetails from './ui/views/PushDetails/PushDetails';
import User from './ui/views/User/UserProfile';
import UserList from './ui/views/UserList/UserList';
import RepoDetails from './ui/views/RepoDetails/RepoDetails';
import RepoList from './ui/views/RepoList/RepoList';
import SettingsView from './ui/views/Settings/Settings';
import { RepoIcon } from '@primer/octicons-react';
import { AccountCircle, Dashboard, Group, Settings } from '@material-ui/icons';
import { Route } from './ui/types';
const dashboardRoutes: Route[] = [
{
path: '/repo',
name: 'Repositories',
icon: RepoIcon,
component: (props) => <RouteGuard component={RepoList} fullRoutePath={`/dashboard/repo`} />,
layout: '/dashboard',
visible: true,
},
{
path: '/repo/:id',
name: 'Repo Details',
icon: Person,
component: (props) => (
<RouteGuard component={RepoDetails} fullRoutePath={`/dashboard/repo/:id`} />
),
layout: '/dashboard',
visible: false,
},
{
path: '/push',
name: 'Dashboard',
icon: Dashboard,
component: (props) => <RouteGuard component={PushRequests} fullRoutePath={`/dashboard/push`} />,
layout: '/dashboard',
visible: true,
},
{
path: '/push/:id',
name: 'Open Push Requests',
icon: Person,
component: (props) => (
<RouteGuard component={PushDetails} fullRoutePath={`/dashboard/push/:id`} />
),
layout: '/dashboard',
visible: false,
},
{
path: '/profile',
name: 'My Account',
icon: AccountCircle,
component: (props) => <RouteGuard component={User} fullRoutePath={`/dashboard/profile`} />,
layout: '/dashboard',
visible: true,
},
{
path: '/admin/user',
name: 'Users',
icon: Group,
component: (props) => (
<RouteGuard component={UserList} fullRoutePath={`/dashboard/admin/user`} />
),
layout: '/dashboard',
visible: true,
},
{
path: '/user/:id',
name: 'User',
icon: Person,
component: (props) => <RouteGuard component={User} fullRoutePath={`/dashboard/user/:id`} />,
layout: '/dashboard',
visible: false,
},
{
path: '/admin/settings',
name: 'Settings',
icon: Settings,
component: (props) => (
<RouteGuard component={SettingsView} fullRoutePath={`/dashboard/admin/settings`} />
),
layout: '/dashboard',
visible: true,
},
];
export default dashboardRoutes;