2024-04-11 00:53:31 +03:00

49 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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>
);
}