mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-12 22:31:00 +00:00
fix(docs): restore theme switch without runtime warnings
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.
This commit is contained in:
@@ -2,6 +2,7 @@ import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
|
||||
import { Heart } from 'lucide-react';
|
||||
import { Logo } from '@/components/logo';
|
||||
import { TelegramIcon } from '@/components/icons';
|
||||
import { DocsThemeSwitch } from '@/components/theme-switch';
|
||||
import { appName, productRepoUrl, telegramChannel, telegramChannelUrl, donateUrl, siteUrl } from './shared';
|
||||
import { getSiteMessages } from './site-i18n';
|
||||
|
||||
@@ -12,6 +13,9 @@ export function baseOptions(lang: string): BaseLayoutProps {
|
||||
const m = getSiteMessages(lang);
|
||||
|
||||
return {
|
||||
slots: {
|
||||
themeSwitch: DocsThemeSwitch,
|
||||
},
|
||||
nav: {
|
||||
title: (
|
||||
<span className="inline-flex items-center gap-2 font-semibold">
|
||||
|
||||
Reference in New Issue
Block a user