-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathroutes.js
150 lines (139 loc) · 4.59 KB
/
routes.js
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/**
=========================================================
* Soft UI Dashboard React - v4.0.0
=========================================================
* Product Page: https://www.creative-tim.com/product/soft-ui-dashboard-react
* Copyright 2022 Creative Tim (https://www.creative-tim.com)
Coded by www.creative-tim.com
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
/**
All of the routes for the Soft UI Dashboard React are added here,
You can add a new route, customize the routes and delete the routes here.
Once you add a new route on this file it will be visible automatically on
the Sidenav.
For adding a new route you can follow the existing routes in the routes array.
1. The `type` key with the `collapse` value is used for a route.
2. The `type` key with the `title` value is used for a title inside the Sidenav.
3. The `type` key with the `divider` value is used for a divider between Sidenav items.
4. The `name` key is used for the name of the route on the Sidenav.
5. The `key` key is used for the key of the route (It will help you with the key prop inside a loop).
6. The `icon` key is used for the icon of the route on the Sidenav, you have to add a node.
7. The `collapse` key is used for making a collapsible item on the Sidenav that has other routes
inside (nested routes), you need to pass the nested routes inside an array as a value for the `collapse` key.
8. The `route` key is used to store the route location which is used for the react router.
9. The `href` key is used to store the external links location.
10. The `title` key is only for the item with the type of `title` and its used for the title text on the Sidenav.
10. The `component` key is used to store the component of its route.
*/
// Soft UI Dashboard React layouts
import Dashboard from "layouts/dashboard";
import Tables from "layouts/tables";
import Billing from "layouts/billing";
import VirtualReality from "layouts/virtual-reality";
import RTL from "layouts/rtl";
import Profile from "layouts/profile";
import SignIn from "layouts/authentication/sign-in";
import SignUp from "layouts/authentication/sign-up";
import SignOut from "layouts/authentication/sign-out";
// Soft UI Dashboard React icons
import Shop from "examples/Icons/Shop";
import Office from "examples/Icons/Office";
import Settings from "examples/Icons/Settings";
import Document from "examples/Icons/Document";
import SpaceShip from "examples/Icons/SpaceShip";
import CustomerSupport from "examples/Icons/CustomerSupport";
import CreditCard from "examples/Icons/CreditCard";
import Cube from "examples/Icons/Cube";
const routes = [
{
type: "collapse",
name: "Dashboard",
key: "dashboard",
route: "/dashboard",
icon: <Shop size="12px" />,
component: <Dashboard />,
noCollapse: true,
protected: true,
},
{
type: "collapse",
name: "Tables",
key: "tables",
route: "/tables",
icon: <Office size="12px" />,
component: <Tables />,
noCollapse: true,
protected: true,
},
{
type: "collapse",
name: "Billing",
key: "billing",
route: "/billing",
icon: <CreditCard size="12px" />,
component: <Billing />,
noCollapse: true,
protected: true,
},
{
type: "collapse",
name: "Virtual Reality",
key: "virtual-reality",
route: "/virtual-reality",
icon: <Cube size="12px" />,
component: <VirtualReality />,
noCollapse: true,
protected: true,
},
{
type: "collapse",
name: "RTL",
key: "rtl",
route: "/rtl",
icon: <Settings size="12px" />,
component: <RTL />,
noCollapse: true,
protected: true,
},
{ type: "title", title: "Account Pages", key: "account-pages" },
{
type: "collapse",
name: "Profile",
key: "profile",
route: "/profile",
icon: <CustomerSupport size="12px" />,
component: <Profile />,
noCollapse: true,
protected: true,
},
{
type: "collapse",
name: "Sign In",
key: "sign-in",
route: "/authentication/sign-in",
icon: <Document size="12px" />,
component: <SignIn />,
noCollapse: true,
},
{
type: "collapse",
name: "Sign Up",
key: "sign-up",
route: "/authentication/sign-up",
icon: <SpaceShip size="12px" />,
component: <SignUp />,
noCollapse: true,
},
{
type: "collapse",
name: "Logout",
key: "sign-out",
route: "/authentication/sign-out",
icon: <SpaceShip size="12px" />,
component: <SignOut />,
noCollapse: true,
},
];
export default routes;