'use client'; import type {ReactNode} from 'react'; import Link from 'next/link'; import {usePathname, useRouter} from 'next/navigation'; import {Button} from 'antd'; import {DashboardOutlined, FileTextOutlined, LogoutOutlined, UserOutlined} from '@ant-design/icons'; import {useAuth} from '@/app/context/AuthContext'; import {useLanguage} from '@/app/context/LanguageContext'; import {accountCopy} from '@/data/account'; export default function DashboardShell({children}: {children: ReactNode}) { const pathname = usePathname(); const router = useRouter(); const auth = useAuth(); const {locale} = useLanguage(); const copy = accountCopy[locale]; const links = [ {href: '/dashboard', label: copy.dashboard, icon: }, {href: '/dashboard/orders', label: copy.orders, icon: }, {href: '/dashboard/profile', label: copy.profile, icon: }, ]; const active = (href: string) => (href === '/dashboard' ? pathname === href : pathname.startsWith(href)); return ( {children} ); }