mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
## Context As per PR title <img width="500" alt="image" src="https://github.com/user-attachments/assets/4cf07471-a0c1-449d-9759-a0ccb3456e09" /> Also resolves FE-3565 Closes mobile menu when a link is clicked <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Mobile menu now closes reliably when selecting more navigation items (Modules, various Developers/Solutions links and footer links). * Enhanced link focus and interaction behavior in the mobile menu for clearer keyboard/touch feedback. * **New Features** * Navigation links can now accept optional click handlers, enabling custom onClick behavior. * **Refactor** * Internal reorganization of mobile menu styling and link composition to simplify maintenance. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
import { DevelopersDropdown } from 'components/Nav/DevelopersDropdown'
|
|
import { ProductDropdown } from 'components/Nav/ProductDropdown'
|
|
import { SolutionsDropdown } from 'components/Nav/SolutionsDropdown'
|
|
import { data as DevelopersData } from 'data/Developers'
|
|
import MainProductsData from 'data/MainProducts'
|
|
import { navData as SolutionsData } from 'data/Solutions'
|
|
|
|
export type Menu = ReturnType<typeof getMenu>
|
|
|
|
export const getMenu = () => ({
|
|
primaryNav: [
|
|
{
|
|
title: 'Product' as const,
|
|
hasDropdown: true,
|
|
dropdown: <ProductDropdown />,
|
|
dropdownContainerClassName: 'rounded-xl',
|
|
subMenu: MainProductsData,
|
|
},
|
|
{
|
|
title: 'Developers' as const,
|
|
hasDropdown: true,
|
|
dropdown: <DevelopersDropdown />,
|
|
dropdownContainerClassName: 'rounded-xl',
|
|
subMenu: DevelopersData,
|
|
},
|
|
{
|
|
title: 'Solutions' as const,
|
|
hasDropdown: true,
|
|
dropdown: <SolutionsDropdown />,
|
|
dropdownContainerClassName: 'rounded-xl',
|
|
subMenu: SolutionsData,
|
|
},
|
|
{
|
|
title: 'Pricing' as const,
|
|
url: '/pricing',
|
|
},
|
|
{
|
|
title: 'Docs' as const,
|
|
url: '/docs',
|
|
},
|
|
{
|
|
title: 'Blog' as const,
|
|
url: '/blog',
|
|
},
|
|
],
|
|
})
|