-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidRoutes.js
More file actions
35 lines (29 loc) · 886 Bytes
/
validRoutes.js
File metadata and controls
35 lines (29 loc) · 886 Bytes
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
// TODO: add the routes in [constants/Routes.ts](constants/Routes.ts) with `isPrivate: false`.
// NOTE: The `components/RouteProtecter` component is used to protect the private routes and give access to route according to user role.
// These pages can be visited by both logged-in and logged-out (public) users
const publicLinks = [
"/privacy",
"/delete_my_account",
"/icons_demo",
"/test",
"/redirect",
"/gateway",
];
// These links can be visited only by logged-out (public) users
const publicOnlyLinks = ["/"];
// Public sections, i.e., any sub-route of these starting-routes can be visited by both logged-in and logged-out (public) users
const publicSections = ["gateway"];
const baseRoute = {
admin: "/admin",
};
const initialRoute = {
admin: "/admin",
"non-admin": "/home",
};
export {
baseRoute,
initialRoute,
publicLinks,
publicOnlyLinks,
publicSections,
};