import type { ItemType } from 'antd/es/menu/interface'; import { useRouter } from 'next/router'; import { Menu } from 'antd'; const menuItems: ItemType[] = [ { label: 'Main checkout', key: '/checkout' }, { label: 'Exposed pages', key: '/checkout/exposed-pages' }, { label: 'Exposed components', type: 'group', children: [ { label: 'checkout/CheckoutTitle', key: '/checkout/test-title' }, { label: 'checkout/ButtonOldAnt', key: '/checkout/test-check-button' }, ], }, ]; export default function AppMenu() { const router = useRouter(); return ( <>
Checkout App Menu
router.push(key)} items={menuItems} /> ); }