mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-12 14:21:01 +00:00
cb902314db
Move html/body shell and global css to root app layout to avoid hydration/script warnings from nested document nodes. Disable provider theme injection and add a custom script-free theme switch in shared layout slots. Also migrate docs search static client initializer to ZBSearch (initDB), add zbsearch dependency, and align docs lint tooling with ESLint 9 compatibility so npm run lint passes.
19 lines
558 B
TypeScript
19 lines
558 B
TypeScript
import { RootProvider } from 'fumadocs-ui/provider/next';
|
|
import { i18n } from '@/lib/i18n';
|
|
import { provider } from '@/lib/i18n-ui';
|
|
import SearchDialog from '@/components/search-dialog';
|
|
|
|
export function generateStaticParams() {
|
|
return i18n.languages.map((lang) => ({ lang }));
|
|
}
|
|
|
|
export default async function LangLayout({ params, children }: LayoutProps<'/[lang]'>) {
|
|
const { lang } = await params;
|
|
|
|
return (
|
|
<RootProvider i18n={provider(lang)} search={{ SearchDialog }} theme={{ enabled: false }}>
|
|
{children}
|
|
</RootProvider>
|
|
);
|
|
}
|