(item: any)
| 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}> |
no test coverage detected