Skip to content

Commit 39aca5f

Browse files
committed
refactor: format
g
1 parent d92d4f2 commit 39aca5f

File tree

12 files changed

+108
-116
lines changed

12 files changed

+108
-116
lines changed

docs/app/(home)/layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { HomeLayout } from 'fumadocs-ui/layouts/home';
2-
import { baseOptions } from '@/lib/layout.shared';
1+
import { HomeLayout } from "fumadocs-ui/layouts/home"
2+
import { baseOptions } from "@/lib/layout.shared"
33

4-
export default function Layout({ children }: LayoutProps<'/'>) {
5-
return <HomeLayout {...baseOptions()}>{children}</HomeLayout>;
4+
export default function Layout({ children }: LayoutProps<"/">) {
5+
return <HomeLayout {...baseOptions()}>{children}</HomeLayout>
66
}

docs/app/(home)/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { redirect } from 'next/navigation';
1+
import { redirect } from "next/navigation"
22

33
export default function HomePage() {
44
// Permanently redirect root to /docs
5-
redirect('/docs');
5+
redirect("/docs")
66
}

docs/app/api/search/route.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// language: 'english',
77
// });
88

9-
import { source } from '@/lib/source';
10-
import { createFromSource } from 'fumadocs-core/search/server';
9+
import { source } from "@/lib/source"
10+
import { createFromSource } from "fumadocs-core/search/server"
1111
// it should be cached forever
12-
export const revalidate = false;
13-
export const { staticGET: GET } = createFromSource(source);
12+
export const revalidate = false
13+
export const { staticGET: GET } = createFromSource(source)

docs/app/docs/[[...slug]]/page.tsx

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
import { source } from '@/lib/source';
2-
import {
3-
DocsBody,
4-
DocsDescription,
5-
DocsPage,
6-
DocsTitle,
7-
} from 'fumadocs-ui/page';
8-
import type { Metadata } from 'next';
9-
import { notFound } from 'next/navigation';
10-
import { createRelativeLink } from 'fumadocs-ui/mdx';
11-
import { getMDXComponents } from '@/mdx-components';
1+
import { source } from "@/lib/source"
2+
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from "fumadocs-ui/page"
3+
import type { Metadata } from "next"
4+
import { notFound } from "next/navigation"
5+
import { createRelativeLink } from "fumadocs-ui/mdx"
6+
import { getMDXComponents } from "@/mdx-components"
127

13-
export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
14-
const params = await props.params;
15-
const page = source.getPage(params.slug);
16-
if (!page) notFound();
8+
export default async function Page(props: PageProps<"/docs/[[...slug]]">) {
9+
const params = await props.params
10+
const page = source.getPage(params.slug)
11+
if (!page) notFound()
1712

18-
const MDXContent = page.data.body;
13+
const MDXContent = page.data.body
1914

2015
return (
2116
<DocsPage toc={page.data.toc} full={page.data.full}>
@@ -25,27 +20,25 @@ export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
2520
<MDXContent
2621
components={getMDXComponents({
2722
// this allows you to link to other pages with relative file paths
28-
a: createRelativeLink(source, page),
23+
a: createRelativeLink(source, page)
2924
})}
3025
/>
3126
</DocsBody>
3227
</DocsPage>
33-
);
28+
)
3429
}
3530

3631
export async function generateStaticParams() {
37-
return source.generateParams();
32+
return source.generateParams()
3833
}
3934

40-
export async function generateMetadata(
41-
props: PageProps<'/docs/[[...slug]]'>,
42-
): Promise<Metadata> {
43-
const params = await props.params;
44-
const page = source.getPage(params.slug);
45-
if (!page) notFound();
35+
export async function generateMetadata(props: PageProps<"/docs/[[...slug]]">): Promise<Metadata> {
36+
const params = await props.params
37+
const page = source.getPage(params.slug)
38+
if (!page) notFound()
4639

4740
return {
4841
title: page.data.title,
49-
description: page.data.description,
50-
};
42+
description: page.data.description
43+
}
5144
}

docs/app/docs/layout.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
2-
import { baseOptions } from '@/lib/layout.shared';
3-
import { source } from '@/lib/source';
1+
import { DocsLayout } from "fumadocs-ui/layouts/docs"
2+
import { baseOptions } from "@/lib/layout.shared"
3+
import { source } from "@/lib/source"
44

5-
export default function Layout({ children }: LayoutProps<'/docs'>) {
5+
export default function Layout({ children }: LayoutProps<"/docs">) {
66
return (
77
<DocsLayout tree={source.pageTree} {...baseOptions()}>
88
{children}
99
</DocsLayout>
10-
);
10+
)
1111
}

docs/app/layout.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import '@/app/global.css';
2-
import { RootProvider } from 'fumadocs-ui/provider';
3-
import { Inter } from 'next/font/google';
1+
import "@/app/global.css"
2+
import { RootProvider } from "fumadocs-ui/provider"
3+
import { Inter } from "next/font/google"
44

55
const inter = Inter({
6-
subsets: ['latin'],
7-
});
6+
subsets: ["latin"]
7+
})
88

9-
export default function Layout({ children }: LayoutProps<'/'>) {
9+
export default function Layout({ children }: LayoutProps<"/">) {
1010
return (
1111
<html lang="en" className={inter.className} suppressHydrationWarning>
1212
<body className="flex flex-col min-h-screen">
1313
<RootProvider>{children}</RootProvider>
1414
</body>
1515
</html>
16-
);
16+
)
1717
}

docs/lib/layout.shared.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
1+
import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared"
22

33
/**
44
* Shared layout configurations
@@ -10,9 +10,9 @@ import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
1010
export function baseOptions(): BaseLayoutProps {
1111
return {
1212
nav: {
13-
title: 'Evolution SDK',
13+
title: "Evolution SDK"
1414
},
1515
// see https://fumadocs.dev/docs/ui/navigation/links
16-
links: [],
17-
};
16+
links: []
17+
}
1818
}

docs/lib/source.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { docs } from '@/.source';
2-
import { loader } from 'fumadocs-core/source';
1+
import { docs } from "@/.source"
2+
import { loader } from "fumadocs-core/source"
33

44
// See https://fumadocs.vercel.app/docs/headless/source-api for more info
55
export const source = loader({
66
// it assigns a URL to your pages
7-
baseUrl: '/docs',
8-
source: docs.toFumadocsSource(),
9-
});
7+
baseUrl: "/docs",
8+
source: docs.toFumadocsSource()
9+
})

docs/mdx-components.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import defaultMdxComponents from 'fumadocs-ui/mdx';
2-
import type { MDXComponents } from 'mdx/types';
1+
import defaultMdxComponents from "fumadocs-ui/mdx"
2+
import type { MDXComponents } from "mdx/types"
33

44
// use this function to get MDX components, you will need it for rendering MDX
55
export function getMDXComponents(components?: MDXComponents): MDXComponents {
66
return {
77
...defaultMdxComponents,
8-
...components,
9-
};
8+
...components
9+
}
1010
}

docs/scripts/copy-evolution-docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ async function main() {
114114
}
115115
}
116116

117-
main()
117+
main()

0 commit comments

Comments
 (0)