useDropdownMenu() — supabase Function Reference
Architecture documentation for the useDropdownMenu() function in useDropdownMenu.tsx from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 2f16d733_9e88_d04d_a558_feea2279fcb9["useDropdownMenu()"] 7ce38153_9ef7_d978_7651_da4aa9818e4c["TopNavBar()"] 7ce38153_9ef7_d978_7651_da4aa9818e4c -->|calls| 2f16d733_9e88_d04d_a558_feea2279fcb9 style 2f16d733_9e88_d04d_a558_feea2279fcb9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/components/Navigation/NavigationMenu/useDropdownMenu.tsx lines 10–84
const useDropdownMenu = (user: User | null) => {
const menu: menuItem[][] = [
[
{
label: user?.email ?? "You're logged in",
type: 'text',
icon: UserIcon,
},
{
label: 'Account Preferences',
icon: Settings,
href: 'https://supabase.com/dashboard/account/me',
},
{
label: 'All Projects',
icon: Database,
href: 'https://supabase.com/dashboard/projects',
},
],
[
isFeatureEnabled('docs:navigation_dropdown_links_home')
? {
label: 'Supabase.com',
icon: Globe,
href: 'https://supabase.com',
otherProps: {
target: '_blank',
rel: 'noreferrer noopener',
},
}
: {
label: 'Dashboard',
icon: Home,
href: '../dashboard',
},
{
label: 'GitHub',
icon: IconGitHub as any,
href: 'https://github.com/supabase/supabase',
otherProps: {
target: '_blank',
rel: 'noreferrer noopener',
},
},
{
label: 'Support',
icon: LifeBuoy,
href: 'https://supabase.com/support',
otherProps: {
target: '_blank',
rel: 'noreferrer noopener',
},
},
],
[
{
label: 'Theme',
type: 'theme',
},
],
[
{
label: 'Logout',
type: 'button',
icon: LogOut,
onClick: async () => {
await logOut()
window.location.reload()
},
},
],
]
return menu
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does useDropdownMenu() do?
useDropdownMenu() is a function in the supabase codebase.
What calls useDropdownMenu()?
useDropdownMenu() is called by 1 function(s): TopNavBar.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free