mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-27 09:19:53 +00:00
(cherry picked from commit e7522b71172874f6624eb45e09a78f013f287270) Co-authored-by: Hanzo Dev <[email protected]>
26 lines
588 B
TypeScript
26 lines
588 B
TypeScript
'use client';
|
|
|
|
import { RootProvider } from '@hanzo/docs/ui/provider/base';
|
|
import dynamic from 'next/dynamic';
|
|
import type { ReactNode } from 'react';
|
|
import { AISearch } from '@/components/ai/search';
|
|
|
|
const SearchDialog = dynamic(() => import('@/components/layouts/search'), {
|
|
ssr: false,
|
|
});
|
|
|
|
export function Provider({ children }: { children: ReactNode }) {
|
|
return (
|
|
<RootProvider
|
|
search={{
|
|
SearchDialog,
|
|
}}
|
|
theme={{ defaultTheme: 'dark', enableSystem: false }}
|
|
>
|
|
<AISearch>
|
|
{children}
|
|
</AISearch>
|
|
</RootProvider>
|
|
);
|
|
}
|