-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavigation.ts
137 lines (132 loc) · 3.65 KB
/
navigation.ts
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
export type DisplayConditionAuthId = "logged_in" | "not_logged_in" | "always"
export type DisplayConditionProfileTypeId =
| "candidate"
| "employer"
| "always"
| "either"
| "neither"
export interface NavigationItem {
children: string
redirect: { pathname: string }
displayConditionAuthId: DisplayConditionAuthId
displayConditionProfileTypeId: DisplayConditionProfileTypeId
highlight?: boolean
}
export type Navigation = NavigationItem[]
const navigation: Navigation = [
{
children: "Home",
redirect: { pathname: "/" },
displayConditionAuthId: "always",
displayConditionProfileTypeId: "always",
},
{
children: "Dashboard",
redirect: { pathname: "/dashboard/profile" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "always",
},
{
children: "Candidates",
redirect: { pathname: "/candidates" },
displayConditionAuthId: "always",
displayConditionProfileTypeId: "always",
},
{
children: "Jobs",
redirect: { pathname: "/jobs" },
displayConditionAuthId: "always",
displayConditionProfileTypeId: "always",
},
{
children: "Referrers",
redirect: { pathname: "/referrers" },
displayConditionAuthId: "always",
displayConditionProfileTypeId: "always",
},
{
children: "How it works",
redirect: { pathname: "/how-it-works" },
displayConditionAuthId: "always",
displayConditionProfileTypeId: "always",
},
{
children: "About",
redirect: { pathname: "/about" },
displayConditionAuthId: "always",
displayConditionProfileTypeId: "always",
},
{
children: "Contact",
redirect: { pathname: "/contact" },
displayConditionAuthId: "always",
displayConditionProfileTypeId: "always",
},
{
children: "Post a job",
redirect: { pathname: "/dashboard/post-job" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "employer",
},
{
children: "Resume",
redirect: { pathname: "/dashboard/resume" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "candidate",
},
{
children: "Applications",
redirect: { pathname: "/dashboard/applications" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "candidate",
},
{
children: "Jobs posted",
redirect: { pathname: "/dashboard/jobs-posted" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "employer",
},
{
children: "Notifications",
redirect: { pathname: "/dashboard/notifications" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "always",
},
{
children: "TEST candidate",
redirect: { pathname: "/dashboard/candidate" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "candidate",
},
{
children: "TEST employer",
redirect: { pathname: "/dashboard/employer" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "employer",
},
{
children: "TEST either",
redirect: { pathname: "/dashboard/either" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "either",
},
{
children: "TEST neither",
redirect: { pathname: "/dashboard/neither" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "neither",
},
{
children: "TEST always",
redirect: { pathname: "/dashboard/always" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "always",
},
{
children: "Settings",
redirect: { pathname: "/dashboard/settings" },
displayConditionAuthId: "logged_in",
displayConditionProfileTypeId: "always",
},
]
export default navigation