Restore search check

This commit is contained in:
Terry Sutton committed 2023-04-14 09:09:36 -02:30
1 parent fe790dc326
commit dede2e83a7
2 files changed
+3 -1

No files matched your search

@@ -257,7 +257,7 @@ const CommandMenu = ({ projectRef }: CommandMenuProps) => {
</CommandGroup>
<ThemeOptions isSubItem />
{site === 'studio' && <SearchableStudioItems />}
{site === 'studio' && search && <SearchableStudioItems />}
</>
)}
{currentPage === COMMAND_ROUTES.AI && <AiCommand />}
@@ -1,7 +1,9 @@
import { useCommandState } from 'cmdk-supabase'
import { CommandItem } from './Command.utils'
import React from 'react'
export default function SearchOnlyItem({ children, isSubItem, ...props }: any) {
console.log(children)
const search = useCommandState((state) => state.search)
// if search is empty & items is marked as a subItem, don't show it
// ie: only show these items in search results, not top level