Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Move to inline

Terry Suttond4391925a2d7
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index fc0f31dfb6b..11619e4c2c6 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -65,11 +65,6 @@ const CommandMenu = ({ projectRef }: CommandMenuProps) => {
useCommandMenu()
const showCommandInput = !currentPage || !CHAT_ROUTES.includes(currentPage)
- const handleRouteChange = (url: string) => {
- router.push(url)
- setIsOpen(false)
- }
-
return (
<>
<CommandDialog
@@ -213,7 +208,10 @@ const CommandMenu = ({ projectRef }: CommandMenuProps) => {
<CommandItem
key={item.url}
type="link"
- onSelect={() => handleRouteChange(itemUrl)}
+ onSelect={() => {
+ router.push(item.url)
+ setIsOpen(false)
+ }}
>
<IconArrowRight className="text-scale-900" />
<CommandLabel>