-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpage.tsx
More file actions
88 lines (79 loc) · 2.97 KB
/
Copy pathpage.tsx
File metadata and controls
88 lines (79 loc) · 2.97 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
'use client'
import { Breadcrumb } from 'flowbite-react'
import Link from 'next/link'
import { useRouter } from 'next/navigation'
import {
HiHome,
HiOutlineAdjustments,
HiOutlineClipboardCheck,
HiOutlineCollection,
} from 'react-icons/hi'
import AdminTreeNavigation from '@/components/admin/AdminTreeNavigation'
import withAdmin from '@/components/common/HOC/authAdmin'
import { useNextTranslation } from '@/src/hooks/i18n'
function AdminDashboard() {
const router = useRouter()
const { t } = useNextTranslation()
return (
<div className="p-4">
<Breadcrumb className="py-4">
<Breadcrumb.Item href="/" icon={HiHome} className="dark">
{t('Home')}
</Breadcrumb.Item>
<Breadcrumb.Item href="#" className="dark">
{t('Admin Dashboard')}
</Breadcrumb.Item>
</Breadcrumb>
<h1 className="text-2xl font-bold text-gray-200 mb-6">
{t('Admin Dashboard')}
</h1>
<div className="grid grid-cols-1 lg:grid-cols-4 gap-6">
<div className="lg:col-span-1">
<AdminTreeNavigation />
</div>
<div className="lg:col-span-3">
<div className="bg-gray-800 rounded-lg p-6">
<h2 className="text-xl font-semibold text-gray-200 mb-4">
{t('Quick Actions')}
</h2>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<Link
href="/admin/search-ranking"
className="bg-blue-600 hover:bg-blue-700 text-white rounded-lg p-4 flex items-center transition-colors"
>
<HiOutlineAdjustments className="h-8 w-8 mr-3" />
<span>{t('Search Ranking Table')}</span>
</Link>
<Link
href="/admin/nodeversions?filter=flagged"
className="bg-yellow-600 hover:bg-yellow-700 text-white rounded-lg p-4 flex items-center transition-colors"
>
<HiOutlineClipboardCheck className="h-8 w-8 mr-3" />
<span>{t('Review Flagged Versions')}</span>
</Link>
<Link
href="/admin/claim-nodes"
className="bg-green-600 hover:bg-green-700 text-white rounded-lg p-4 flex items-center transition-colors"
>
<HiOutlineCollection className="h-8 w-8 mr-3" />
<span>{t('Manage Unclaimed Nodes')}</span>
</Link>
<Link
href="/admin/nodes"
className="bg-purple-600 hover:bg-purple-700 text-white rounded-lg p-4 flex items-center transition-colors"
>
<HiOutlineCollection className="h-8 w-8 mr-3" />
<span>{t('Manage All Nodes')}</span>
</Link>
</div>
</div>
</div>
</div>
</div>
)
}
const WrappedAdminDashboard = withAdmin(AdminDashboard)
export default function Page() {
return <WrappedAdminDashboard />
}
export const dynamic = 'force-dynamic'