feat: add admin page routing

This commit is contained in:
seaznCode 2025-10-14 19:06:07 +02:00
parent 94bc1e9219
commit c16ce3093c

View File

@ -10,8 +10,11 @@ import {
ArrowRightIcon
} from '@heroicons/react/24/outline'
import { useMemo } from 'react'
import { useRouter } from 'next/navigation'
export default function AdminDashboardPage() {
const router = useRouter()
// Mocked aggregates (replace with real fetch)
const userStats = useMemo(() => ({
total: 101,
@ -128,8 +131,7 @@ export default function AdminDashboardPage() {
<button
type="button"
className="w-full inline-flex items-center justify-center gap-2 rounded-md bg-amber-50 hover:bg-amber-100 border border-amber-200 text-amber-700 text-xs sm:text-sm font-medium px-4 py-2.5 transition"
// TODO: onClick navigate to verification queue
onClick={() => {}}
onClick={() => router.push('/admin/user-verify')}
>
Click here to Verify Users
<ArrowRightIcon className="h-4 w-4" />
@ -169,7 +171,7 @@ export default function AdminDashboardPage() {
type="button"
className="w-full inline-flex items-center justify-center gap-2 rounded-md bg-violet-50 hover:bg-violet-100 border border-violet-200 text-violet-700 text-xs sm:text-sm font-medium px-4 py-2.5 transition"
// TODO: navigate to permissions page
onClick={() => {}}
onClick={() => router.push('/admin/user-management')}
>
Go to Permission Management
<ArrowRightIcon className="h-4 w-4" />