'use client';
import Link from 'next/link';
import { usePathname, useRouter } from 'next/navigation';
import { useState } from 'react';
const NAV_ITEMS = [
{
href: '/admin/dashboard',
label: '대시보드',
icon: (
),
},
{
href: '/admin/members',
label: '회원 관리',
icon: (
),
},
{
href: '/admin/services',
label: '서비스 설정',
icon: (
),
},
{
href: '/admin/contacts',
label: '문의 내역',
icon: (
),
},
];
export default function AdminSidebar() {
const pathname = usePathname();
const router = useRouter();
const [loggingOut, setLoggingOut] = useState(false);
async function handleLogout() {
setLoggingOut(true);
await fetch('/api/admin/logout', { method: 'POST' });
router.push('/admin/login');
}
return (
);
}