Skip to content

Commit a446d4a

Browse files
Copilothotlong
andcommitted
Fix fumadocs style conflict by isolating RootProvider to docs layout only
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 63ab58b commit a446d4a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

apps/site/app/docs/layout.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { source } from '@/lib/source';
22
import type { ReactNode } from 'react';
33
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
4+
import { RootProvider } from 'fumadocs-ui/provider';
45

56
export default function Layout({ children }: { children: ReactNode }) {
67
return (
7-
<DocsLayout tree={source.pageTree} nav={{ title: 'Object UI' }}>
8-
{children}
9-
</DocsLayout>
8+
<RootProvider>
9+
<DocsLayout tree={source.pageTree} nav={{ title: 'Object UI' }}>
10+
{children}
11+
</DocsLayout>
12+
</RootProvider>
1013
);
1114
}

apps/site/app/layout.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import './global.css';
2-
import { RootProvider } from 'fumadocs-ui/provider';
32
import type { ReactNode } from 'react';
43

54
export default function Layout({ children }: { children: ReactNode }) {
65
return (
76
<html lang="en" suppressHydrationWarning>
8-
<body>
9-
<RootProvider>{children}</RootProvider>
10-
</body>
7+
<body>{children}</body>
118
</html>
129
);
1310
}

0 commit comments

Comments
 (0)