mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
Changes: - **Search**: Replaced Inkeep with Fumadocs' native built-in search (createFromSource). Removed @inkeep/cxkit-react and custom search dialogs. - **Hydration Fix**: Removed markdown links from ### headings in egress.mdx (across all versions) to fix the <a inside a> DOM mismatch error. - **Console Fix**: Added the missing key prop to <VersionSelector/> in the layout to resolve the React list warning. --------- Co-authored-by: Florian Forster <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
34 lines
991 B
TypeScript
34 lines
991 B
TypeScript
'use client';
|
|
|
|
import { RootProvider } from 'fumadocs-ui/provider/next';
|
|
import { ReactNode } from 'react';
|
|
import { useParams } from 'next/navigation';
|
|
|
|
import MixpanelProvider from '@/components/mixpanel-provider';
|
|
import PlausibleProvider from '@/components/plausible-provider';
|
|
import { getVersionFromSlug } from '@/lib/versions';
|
|
|
|
export function Providers({ children }: { children: ReactNode }) {
|
|
const params = useParams();
|
|
const slug = params?.slug as string[] | undefined;
|
|
|
|
return (
|
|
<RootProvider
|
|
search={{
|
|
options: {
|
|
api: '/docs/api/search',
|
|
// Every search index entry is tagged with its docs version (see
|
|
// app/api/search/route.ts). `defaultTag` applies that filter; `tags`
|
|
// would only add a visible filter pill.
|
|
defaultTag: getVersionFromSlug(slug),
|
|
},
|
|
}}
|
|
>
|
|
<PlausibleProvider />
|
|
<MixpanelProvider>
|
|
{children}
|
|
</MixpanelProvider>
|
|
</RootProvider>
|
|
);
|
|
}
|