MCPcopy Create free account
hub / github.com/alanagoyal/docbase / handleItemClick

Function handleItemClick

components/command-menu.tsx:82–91  ·  view source on GitHub ↗
(item: any)

Source from the content-addressed store, hash-verified

80 }, [router, theme, setTheme, navigateAndCloseDialog, handleSignOut]);
81
82 const handleItemClick = (item: any) => {
83 if (item.href) {
84 navigateAndCloseDialog(item.href);
85 } else if (item.action === 'theme') {
86 setTheme(theme === 'light' ? 'dark' : 'light');
87 setOpen(false);
88 } else if (item.action === 'logout') {
89 handleSignOut();
90 }
91 };
92
93 return (
94 <CommandDialog open={open} onOpenChange={setOpen}>

Callers 1

CommandMenuFunction · 0.85

Calls 1

handleSignOutFunction · 0.70

Tested by

no test coverage detected