Commands() — supabase Function Reference
Architecture documentation for the Commands() function in commandmenu-subpage.tsx from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/design-system/registry/default/example/commandmenu-subpage.tsx lines 15–53
function Commands() {
const setPage = useSetPage()
const commands = useMemo(
() => [
{
id: 'subcommand',
name: 'Subcommand',
action: () => alert('Triggered from subpage'),
},
],
[]
)
useRegisterPage(
'Subpage',
{
type: PageType.Commands,
sections: [
{
id: 'subpage',
name: 'Subpage',
commands,
},
],
},
{ deps: [commands] }
)
useRegisterCommands('Commands', [
{
id: 'subpage',
name: 'Go to subpage',
action: () => setPage('Subpage'),
},
])
return null
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free