mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-06 13:44:21 +08:00
- Updated the demo API to support locale-based content rendering. - Refactored the main layout to accommodate language-specific metadata and routing. - Introduced new components for blog and documentation pages, ensuring proper language handling. - Added styles for improved UI consistency across different sections. - Removed deprecated layout files and streamlined the structure for better maintainability.
16 lines
517 B
TypeScript
16 lines
517 B
TypeScript
import { source } from '@/lib/source';
|
|
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
|
|
import { baseOptions } from '@/lib/layout.shared';
|
|
import { i18n, isLanguage } from '@/lib/i18n';
|
|
|
|
export default async function Layout({ params, children }: LayoutProps<'/[lang]/docs'>) {
|
|
const { lang } = await params;
|
|
const language = isLanguage(lang) ? lang : i18n.defaultLanguage;
|
|
|
|
return (
|
|
<DocsLayout tree={source.getPageTree(language)} {...baseOptions(language)}>
|
|
{children}
|
|
</DocsLayout>
|
|
);
|
|
}
|