Release 3X-UI for Docker / build (push) Canceled after 0s
Release 3X-UI / build (386) (push) Canceled after 0s
Release 3X-UI / build (amd64) (push) Canceled after 0s
Release 3X-UI / build (arm64) (push) Canceled after 0s
Release 3X-UI / build (armv5) (push) Canceled after 0s
Release 3X-UI / build (armv6) (push) Canceled after 0s
Release 3X-UI / build (armv7) (push) Canceled after 0s
Release 3X-UI / build (s390x) (push) Canceled after 0s
Release 3X-UI / Build for Windows (amd64) (push) Canceled after 0s
Release 3X-UI / Publish rolling dev release (push) Canceled after 0s
29 lines
965 B
TypeScript
29 lines
965 B
TypeScript
import { HomeLayout } from 'fumadocs-ui/layouts/home';
|
|
import { baseOptions } from '@/lib/layout.shared';
|
|
import { HomeLanguageSwitcher } from '@/components/home/language-switcher';
|
|
|
|
export default async function Layout({ params, children }: LayoutProps<'/[lang]'>) {
|
|
const { lang } = await params;
|
|
const options = baseOptions(lang);
|
|
return (
|
|
<HomeLayout
|
|
{...options}
|
|
// Disable fumadocs' built-in popover language switcher here: nested in the
|
|
// home navbar's Radix NavigationMenu its item clicks don't fire. We inject
|
|
// an anchor-based one instead (see HomeLanguageSwitcher). Docs keep the
|
|
// built-in switcher (its sidebar isn't a NavigationMenu, so it works).
|
|
i18n={false}
|
|
links={[
|
|
...(options.links ?? []),
|
|
{
|
|
type: 'custom',
|
|
secondary: true,
|
|
children: <HomeLanguageSwitcher current={lang} />,
|
|
},
|
|
]}
|
|
>
|
|
{children}
|
|
</HomeLayout>
|
|
);
|
|
}
|