mirror of
https://github.com/supabase/supabase.git
synced 2026-05-27 14:58:19 +08:00
Replace docs command menu with Command Menu V2 from ui-patterns/CommandMenu. This introduces the prepackaged folder for the shared Command Menu, which contains commands that are shared across the sites (for example, docs search, theme switcher). Commands that are only applicable to a single site are now defined within that site's own app folder (put them wherever makes sense for your app folder organization, as long as you use the hooks within a global CommandProvider it will work...) Tested navigating around, using search and AI on laptop and mobile.
15 lines
351 B
TypeScript
15 lines
351 B
TypeScript
'use client'
|
|
|
|
import dynamic from 'next/dynamic'
|
|
|
|
import { useCommandMenuInitiated } from 'ui-patterns/CommandMenu'
|
|
|
|
const LazyCommandMenu = dynamic(() => import('./CommandMenu'), { ssr: false })
|
|
|
|
const DocsCommandMenu = () => {
|
|
const isInitiated = useCommandMenuInitiated()
|
|
return isInitiated && <LazyCommandMenu />
|
|
}
|
|
|
|
export { DocsCommandMenu }
|