49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
import Background from './Background';
|
||
import type { MenuProps } from 'antd';
|
||
import Link from 'next/link';
|
||
import { useRouter } from 'next/router';
|
||
import { Menu } from 'ui/elements';
|
||
import { AppstoreOutlined, SettingOutlined } from 'ui/elements/icons';
|
||
|
||
const items: MenuProps['items'] = [
|
||
{
|
||
children: [
|
||
{
|
||
// icon: <HomeOutlined />,
|
||
key: '/',
|
||
label: <Link href="/">Главная</Link>,
|
||
},
|
||
{
|
||
// icon: <PlusSquareOutlined />,
|
||
key: '/unlimited',
|
||
label: <Link href="/unlimited">Без ограничений</Link>,
|
||
},
|
||
],
|
||
icon: <AppstoreOutlined />,
|
||
key: 'home',
|
||
label: 'Приложение',
|
||
},
|
||
{
|
||
children: [
|
||
{
|
||
// icon: <DatabaseOutlined />,
|
||
key: '/admin/cache',
|
||
label: <Link href="/admin/cache">Управление кэшем</Link>,
|
||
},
|
||
],
|
||
icon: <SettingOutlined />,
|
||
key: 'admin',
|
||
label: 'Панель управления',
|
||
},
|
||
];
|
||
|
||
export function AppNavigation() {
|
||
const { pathname } = useRouter();
|
||
|
||
return (
|
||
<Background>
|
||
<Menu selectedKeys={[pathname]} mode="horizontal" items={items} />
|
||
</Background>
|
||
);
|
||
}
|