Closed Aymericr closed 2 days ago
did you manage to solve this?
For me adding use client
at the top of the provider ( which is them added to my root layout ) is yielding another error.
// KBarProvider.ts
'use client'
import {
KBarAnimator,
KBarPortal,
KBarPositioner,
KBarProvider as OriginalKBarProvider,
KBarSearch
} from 'kbar'
import type { ReactNode } from 'react'
interface Props {
children: ReactNode
}
const KBarProvider = ({ children }: Props) => {
return (
<OriginalKBarProvider>
<KBarPortal>
<KBarPositioner>
<KBarAnimator>
<KBarSearch />
{/* <KBarResults /> */}
</KBarAnimator>
</KBarPositioner>
</KBarPortal>
{children}
</OriginalKBarProvider>
)
}
export default KBarProvider
The error i get is:
[!caution] TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component
Hey! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Fails to spawn the command palette. I tried wrapping it into a 'use client' component but the issue keeps happening.
Dependencies: