Files
supabase/apps/studio/components/ui/ProductMenu/SubMenu.utils.ts
Francesco Sansalvadore 23c827bdda feat: nested mobile nav menu (#43333)
- consolidate `top level menu` and `contextual menu` into nested menu on
mobile
- remove legacy mobile submenu
2026-03-11 13:55:20 +01:00

14 lines
393 B
TypeScript

import type { ProductMenuGroup, SubMenuSection } from './ProductMenu.types'
export function convertSectionsToProductMenu(sections: SubMenuSection[]): ProductMenuGroup[] {
return sections.map((section) => ({
key: section.key,
title: section.heading,
items: section.links.map((link) => ({
key: link.key,
name: link.label,
url: link.href ?? '#',
})),
}))
}