Skip to content

Commit 0b493e4

Browse files
committed
feat: update imports and dependencies for improved functionality
1 parent 92edeb7 commit 0b493e4

5 files changed

Lines changed: 1607 additions & 1322 deletions

File tree

app/[...slug]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import '../global.css';
2-
import {RootProvider} from 'fumadocs-ui/provider';
2+
import {RootProvider} from 'fumadocs-ui/provider/next';
33
import {Inter} from 'next/font/google';
44
import type {ReactNode} from 'react';
55
import {source} from "@/lib/source";

lib/source.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
import {docs} from '@/.source';
1+
import {docs} from '@/.source/server';
22
import {loader} from 'fumadocs-core/source';
3+
import * as tablerIcons from '@tabler/icons-react';
4+
import { createElement } from 'react';
35

46
// See https://fumadocs.vercel.app/docs/headless/source-api for more info
57
export const source = loader({
68
// it assigns a URL to your pages
79
baseUrl: '/',
810
source: docs.toFumadocsSource(),
11+
icon(icon) {
12+
const tablerName = `${icon}`;
13+
if (tablerName in tablerIcons) {
14+
return createElement(tablerIcons[tablerName as keyof typeof tablerIcons] as any);
15+
}
16+
}
917
});

0 commit comments

Comments
 (0)