@@ -7,14 +7,13 @@ import useAuth from "@/hooks/useAuth";
7
7
import MenuButton from "@/components/MenuButton"
8
8
import MenuSpacer from "@/components/MenuSpacer"
9
9
import QuestModal from "@/components/QuestModal" ;
10
- import withAuth from "@/hocs/WithAuth" ;
11
10
12
11
import logoImg from '@/assets/placeholder-logo.png'
13
- import Background from "@/components/Background" ;
14
12
import { Dialog , DialogContent } from "@radix-ui/react-dialog" ;
15
13
import Button from "@/components/Button" ;
14
+ import withAuth from "@/hocs/withAuth" ;
16
15
17
- const DeveloperPage = ( ) => {
16
+ const AdminPage = ( ) => {
18
17
const navigate = useNavigate ( ) ;
19
18
const { accessToken } = useAuth ( ) ;
20
19
const [ currentQuest , setCurrentQuest ] = useState < Quest | null > ( null ) ;
@@ -34,9 +33,12 @@ const DeveloperPage = () => {
34
33
35
34
< div className = "flex flex-col items-start mt-20" >
36
35
< MenuButton text = "RANDOM QUEST" onClick = { handleGetRandomQuest } />
36
+ < MenuButton text = "TEST MODAL" onClick = { ( ) => setIsQuestModalOpen ( true ) } />
37
37
< MenuSpacer />
38
38
39
- < MenuButton text = "TEST MODAL" onClick = { ( ) => setIsQuestModalOpen ( true ) } />
39
+ < MenuButton text = "view suggestions" onClick = { ( ) => navigate ( "/admin/suggestions" ) } />
40
+ < MenuButton text = "view quests" onClick = { ( ) => navigate ( "/admin/quests" ) } />
41
+ < MenuButton text = "view users" onClick = { ( ) => navigate ( "/admin/users" ) } />
40
42
< MenuSpacer />
41
43
42
44
< MenuButton text = "back" onClick = { ( ) => navigate ( "/" ) } />
@@ -50,7 +52,7 @@ const DeveloperPage = () => {
50
52
className = "bg-slate-100"
51
53
>
52
54
< p >
53
- { JSON . stringify ( currentQuest ) }
55
+ { JSON . stringify ( currentQuest ) }
54
56
</ p >
55
57
< Button type = "confirm" text = "close" onClick = { ( ) => setCurrentQuest ( null ) } />
56
58
</ DialogContent >
@@ -73,12 +75,10 @@ const DeveloperPage = () => {
73
75
"Escape with the loot"
74
76
] }
75
77
/>
76
-
77
- < Background />
78
78
</ main >
79
79
) ;
80
80
}
81
81
82
- const AuthenticatedDeveloperPage = withAuth ( DeveloperPage ) ;
82
+ const AuthenticatedAdminPage = withAuth ( AdminPage , "admin" ) ;
83
83
84
- export default AuthenticatedDeveloperPage ;
84
+ export default AuthenticatedAdminPage ;
0 commit comments